7zsd.sfx / 7zSD_En.CHM: Undocumented Features

Got a Guide? Screencast? or Other Methods to Share?
User avatar
bphlpt
Site Admin
Posts: 62
Joined: Fri Oct 29, 2010 6:09 am
Has thanked: 2 times

7zsd.sfx / 7zSD_En.CHM: Undocumented Features

Postby bphlpt » Tue Apr 10, 2012 5:39 pm

Credit for this goes to shiner at RyanVM - http://www.ryanvm.net/forum/viewtopic.php?p=122868


shiner wrote:7zSD_En.chm is the English help manual for the modified 7zSFX module.
It can be found here.

The last version of 7zSD_En.chm was released for build 1501 of Oleg Scherbakov's modified 7zSFX module.
The current version of the modified module (build 2367) has several new features which are undocumented in that English version of the Help manual. A thread which reveals and explains these undocumented features may be helpful to users of the modified module. Anyone who has information on any undocumented features feel free to supplement, provide corrections, or expand on anything posted here. An authorative source on using the module is gora, who I hope will find time to post in this thread.

My main source of information is 7zSD_RU.chm, the Russian Help manual for build 2100 of the module. I downloaded it several months ago thinking to translate it into English with the help of Google Translate, but have not had the time to do so. The information should still be up to date for build 2367, which was a bugfix release. So I am starting this thread to get the info out to English users of the modified 7zSFX module. Some of the information I have accumulated from posts by gora or Oleg_Sch. And finally, a tiny bit of the information is from my own experience using the module.

gora, please correct me if I post anything inaccurate or incomplete.



New Command prefixes

x64
A command with this prefix is executed only on a 64-bit system. Also, the program to be run in the command will be performed in a 64-bit environment, regardless of bit depth of the module (x64 or x86).
When used on a 32-bit system, any command with this prefix is ignored and the program specified in the parameter will not be executed.

x86
A command with this prefix is executed only on a 32-bit system. When used on a 64-bit system, any command with this prefix is ignored and the program specified in the parameter will not be executed.

waitall
A command with this prefix makes the module wait for the command to run and complete, including all the child processes that were created by running the command, before preceding to the next command.

Examples

Code: Select all

RunProgram=x86setup_x86.exe
RunProgram=x64setup_x64.exe
RunProgram_waitallsetup.exe


I have not been successful in using the waitall prefix. gora may be able to shed some additional light on it.


A new variable has been defined in addition to the %%M, %%S, %%T variables,

%%P
- this variable is equivalent to x86 or x64 (no quotes) depending on the OS architecture in which the module is run.

One possible example

Code: Select all

RunProgram=%%Ptypical.msi


where in the SFX you have two directories named
x86
x64

inside the x86 directory is a 32 bit installation named typical.msi
inside the x64 directory is a 64 bit installation named typical.msi

Many other possibilities to use this variable.



Other pre-defined variables and their destination directories (for XP)

7zSfxFolder00=CDocuments and SettingsCurrentUserDesktop
7zSfxFolder02=CDocuments and SettingsCurrentUserStart MenuPrograms
7zSfxFolder05=CDocuments and SettingsCurrentUserMy Documents
7zSfxFolder06=CDocuments and SettingsCurrentUserFavorites
7zSfxFolder07=CDocuments and SettingsCurrentUserStart MenuProgramsStartup
7zSfxFolder08=CDocuments and SettingsCurrentUserRecent
7zSfxFolder09=CDocuments and SettingsCurrentUserSendTo
7zSfxFolder11=CDocuments and SettingsCurrentUserStart Menu
7zSfxFolder13=CDocuments and SettingsCurrentUserMy DocumentsMy Music
7zSfxFolder14=CDocuments and SettingsCurrentUserMy DocumentsMy Videos
7zSfxFolder16=CDocuments and SettingsCurrentUserDesktop
7zSfxFolder19=CDocuments and SettingsCurrentUserNetHood
7zSfxFolder20=CWINDOWSFonts
7zSfxFolder21=CDocuments and SettingsCurrentUserTemplates
7zSfxFolder22=CDocuments and SettingsAll UsersStart Menu
7zSfxFolder23=CDocuments and SettingsAll UsersStart MenuPrograms
7zSfxFolder24=CDocuments and SettingsAll UsersStart MenuProgramsStartup
7zSfxFolder25=CDocuments and SettingsAll UsersDesktop
7zSfxFolder26=CDocuments and SettingsCurrentUserApplication Data
7zSfxFolder27=CDocuments and SettingsCurrentUserPrintHood
7zSfxFolder28=CDocuments and SettingsCurrentUserLocal SettingsApplication Data
7zSfxFolder31=CDocuments and SettingsAll UsersFavorites
7zSfxFolder32=CDocuments and SettingsCurrentUserLocal SettingsTemporary Internet Files
7zSfxFolder33=CDocuments and SettingsCurrentUserCookies
7zSfxFolder34=CDocuments and SettingsCurrentUserLocal SettingsHistory
7zSfxFolder35=CDocuments and SettingsAll UsersApplication Data
7zSfxFolder36=CWINDOWS
7zSfxFolder37=CWINDOWSsystem32
7zSfxFolder38=CProgram Files
7zSfxFolder39=CDocuments and SettingsCurrentUserMy DocumentsMy Pictures
7zSfxFolder40=CDocuments and SettingsCurrentUser
7zSfxFolder41=CWINDOWSsystem32
7zSfxFolder43=CProgram FilesCommon Files
7zSfxFolder45=CDocuments and SettingsAll UsersTemplates
7zSfxFolder46=CDocuments and SettingsAll UsersShared Documents
7zSfxFolder47=CDocuments and SettingsAll UsersStart MenuProgramsAdministrative Tools
7zSfxFolder53=CDocuments and SettingsAll UsersShared DocumentsMy Music
7zSfxFolder54=CDocuments and SettingsAll UsersShared DocumentsMy Pictures
7zSfxFolder55=CDocuments and SettingsAll UsersShared DocumentsMy Videos
7zSfxFolder56=CWINDOWSResources
7zSfxFolder59=CDocuments and SettingsCurrentUserLocal SettingsApplication DataMicrosoftCD Burning

Quick Launch shortcut Example

Code: Select all

Shortcut=26,{%Path1%Program.EXE},{},{MicrosoftInternet ExplorerQuick Launch},{Description},{ProgramName}


Administrative Tools shortcut Example

Code: Select all

Shortcut=47,{%Path2%Program.EXE},{},{},{Description},{ProgramName}


To use as a variable in a commmand, wrap the variable names in %, like

Code: Select all

RunProgram=hidconcmd c  copy %%Tprogram.exe  %7zSfxFolder24% y


Someone please be kind enough to post a list of the destinations for the above variables on Win7.



MiscFlags=x
The sum of the numeric values of flags, or the expanded expression 1+2. The order of the numerical values in the expression is irrevelant. Supported numerical values are defined as follows

1 - Do not check the disk space required for the process of extracting.
2 - Do not check the size of physical memory required for the process of extracting, (useful for testing large highly compressed SFX in VM with limited memory.)
4 - Request administrative rights for all operations of the current SFX, if the user running the SFX does not have admistrative rights , (according to yumeyao in a past post, it does this by creating a separate process.)
8 - A separate password prompt window (dialog 'PasswordTitle') after the dialog 'BeginPrompt' and 'ExtractPath' or 'BeginPrompt' 'ExtractPath'. Without this flag, the dialog 'PasswordTitle' will appear in the 'BeginPrompt' and 'ExtractPath' or 'BeginPrompt' 'ExtractPath ' dialogs.

One possible example

Code: Select all

MiscFlags=6


These options can be overridden from the command line by using the switch '-mfX'.



New password dialog box window options.

PasswordText=text

Displays the specified text OVER password field (the default is Enter password).
Example

Code: Select all

PasswordText=Please enter the password.



PasswordTitle=new_title

Changes the title of the Password dialog window, the default is the name of SFX archive (without extension). You can specify something like This archive is encrypted.
Example

Code: Select all

PasswordTitle=Password Protected Archive!


I think these are to be used with MiscFlags=8 option...



Change default title for warning boxes. (There are currently two possible warning text messages.)

WarningTitle=title_for_warnings

The window title warning (default 7z SFX Warning).

If the parameter is missing, instead of 'WarningTitle' in the warning window will display the name of SFX archive (without extension) to add a warning. If the name of SFX archive unable to determine, it will display the default value.

The two possible warning text messages are defined in the module

Not enough physical memory.
Unpacking can take a long time.


or

On the disk is not enough space to unpack.

Example

Code: Select all

WarningTitle=7zSFX archive extraction warning!


These warning boxes can be avoided by setting flags in the parameter 'MiscFlags', or
the warning windows can also be suppressed by using the switch '-mfX' from the command line.



New Command Line Switches

-bptX
Specifies a time countdown display dialog 'BeginPrompt' or a blend of dialogue 'BeginPrompt' + 'ExtractPath' and the default button, where X

1 ... 999 - display window 1 ... 999 seconds, the countdown is displayed on the button Yes (OK), and upon its expiry, it will be pressed automatically.
-1 ... -999 - Display window 1 ... 999 seconds, the countdown is displayed on the button No (Cancel), and upon its expiry, it will be pressed automatically.
0 - ignored

This switch is used to change the 'BeginPromptTimeout' value which has been written in the configuration file.

========================================================

-mfx
The elevation of rights, separate password prompt, and showing of warning dialog boxes ('WarningTitle') can be suppressed with '-mfx' switch, where X is the sum of values of the MiscFlags

1 - do not check the disk space required for the extraction process
2 - do not check the size of physical memory required for the extraction process
4 - to request administrative rights for all operations of the current SFX, if such rights do not have the user running the SFX.
8 - the password prompt (dialog 'PasswordTitle') after the dialogues 'BeginPrompt' and 'ExtractPath', without this flag, the dialog 'PasswordTitle' dialog will appear before the 'BeginPrompt' and 'ExtractPath'

This switch is used to override values set in the option 'MiscFlags' which have been written in the configuration file.

========================================================

-pX
Specifies the password for encrypted SFX archives, where X = password with which the packaged source 7z archive has been encrypted.
Password without spaces can be specified without quotes. If there are gaps in the password, it must be in quotes.
Examples of use

-sfx.exe -pPassword
-sfx.exe -pPassword with a space

========================================================

-sfxlang
Specifies the language of the existing configuration file that will be used in dialog boxes when the SFX is executed.
The written form-sfxlang xxxx (where xxxx - language identifier). This switch must be the first on the command line.

Currently supported languages are Russian, Ukrainian, and English, so
-sfxlang1049
-sfxlang1058
-sfxlang1033

Note the configuration must be written to support the language before this switch will work on a multi-language dialog SFX.



to be continued ...
Image

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
bphlpt
Site Admin
Posts: 62
Joined: Fri Oct 29, 2010 6:09 am
Has thanked: 2 times

Re: 7zsd.sfx / 7zSD_En.CHM: Undocumented Features

Postby bphlpt » Sun Feb 17, 2013 5:41 am

Another thread at Ryan's that ties in nicely with the one discussed above is [New Updated Tutorial] Making A 7-Zip Switchless Installer. It started all the way back in Aug 2007, but posts continue as recently as Dec 2012 with gora, shiner and others participating. Even Oleg_Sch himself joined Ryan's in Dec to make his one and only post to this thread. The entire thread is only two pages long, so a useful read.

Cheers and Regards
Image

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
bphlpt
Site Admin
Posts: 62
Joined: Fri Oct 29, 2010 6:09 am
Has thanked: 2 times

Re: 7zsd.sfx / 7zSD_En.CHM: Undocumented Features

Postby bphlpt » Sat Mar 30, 2013 1:43 pm

Since you have liked previous posts of mine about the continuing evolution of the modified 7zSFX module discussed in detail here, I thought I'd pass this along as well. It is gora's opinion that the newest 1.6 version of the modified module is every bit as stable and error free as the 1.5 version. shiner is currently trying to translate the help manual for the 1.6 version to English, with help from both gora and Oleg. I am assisting with proofreading and minor corrections to his translation, so I have access to early drafts that it might benefit you ro read.

Fixed - Here is the first draft.

Cheers and Regards
Image

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Tutorials, Tweaks & Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest