Parameter="Value" |
Parameter description and allowed values |
---|---|
Extraction and execution (commands and paths) |
|
AutoInstall="command_auto_install" |
Execution command (multiple instances are allowed). There are two modes: the usual 'RunProgram' or 'ExecuteFile' mode, and automated 'AutoInstall' mode. AUTOMATED installation mode will be invoked if you:
If you do not do anything mentioned above, 'RunProgram' or 'ExecuteFile' will be used as a default command. Environment variables supported by the module are allowed as well as relative paths. The syntax is the same as for 'RunProgram'. |
AutoInstallX="command_auto_install" |
Where X is the scenario number (from 0 to 9) you wish to complete. You can have up to 10 scenarios for automated installations. You can select one of them from the command line ONLY with '-aiX' switch. If you are planning to use several automated scenarios, you do not have to follow a numeric order than setting the X in 'AutoInstallX' parameters. You can have multiple instances of each 'AutoInstallX' command. For example, for a specific scenario you may need to complete three tasks for 'AutoInstall3': AutoInstall3="setup.exe" AutoInstall3="regedit /s cleanup.reg" AutoInstall3="cleanup.cmd" AutoInstall7="setup.exe" AutoInstall7="regedit /s tweaks.reg" While for 'AutoInstall7' you may need only the first two commands. Environment variables supported by the module are allowed as well as relative paths. The syntax is the same as for 'RunProgram'. |
Delete="file_or_folder_name" |
Deletes the specified file or folder AFTER the installation. If the folder name is specified, the entire folder is deleted including all subfolders and their content. ATTENTION! Make sure you don't specify something like "C:\Windows" Environment variables supported by the module are allowed as well as relative paths. For this command the current directory is the one where the SFX resides (for other commands that would be the extraction directory). You can specify as many 'Delete' strings as you wish. They will be processed in the order listed in the config file. |
Directory="path_to_command" |
The path to the 'RunProgram' execution folder (do not confuse with the current folder). Native 7-zip SFX parameter. Can be used for the first 'RunProgram' only. Environment variables supported by the module are allowed as well as relative paths. This is an optional parameter, because both the path and the command can be specified within 'RunProgram' value. For example, RunProgram="notepad.exe" Directory="C:\\Windows\\system32\\" is equivalent to RunProgram="C:\\Windows\\system32\\notepad.exe" |
ExecuteFile="command_for_executing" |
Execution command. Native 7-zip SFX parameter. Environment variables supported by the module are allowed as well as relative paths. The syntax is the same as for 'RunProgram', with the exeption of the switches (they are not allowed). If needed, you can substitute the switches for the executable into 'ExecuteParameters'. |
ExecuteParameters="keys_command" |
Execution command. Native 7-zip SFX parameter. This is an optional parameter. You use it whenever you need to pass a parameter to 'ExecuteFile' via the command line. |
InstallPath="path_to_extract" |
Sets the extraction path. The extraction folder will not be deleted after the extraction. If the 'InstallPath' value is not present in the config file or the path was deleted from the interactive extraction dialog, the archive will be extracted to a temporary folder. This temporary folder will be deleted after the extraction and execution of all commands. Environment variables are allowed (with the exception of %%T and variables defined in 'SetEnvironment', if %%T is used in any of them). You MUST use DOUBLE backslashes in paths. For example: orInstallPath="C:\\Windows\\system32\\test" InstallPath="%PROGRAMFILES%\\test" Relative paths are allowed. The current folder is the one from which the program launching SFX archive was executed. For example, InstallPath="test" creates a folder with the name of "test" in the folder from which the program launching SFX archive was executed. All files will be extracted to the "test" folder. On the other hand, InstallPath="." extracts the archive content to the folder from which the program launching SFX archive was executed. Also, InstallPath="%%S" extracts the archive content to the folder where the SFX is located. If all you need is to extract the archive content to a certain folder, you need to specify a value for 'InstallPath' in the config file. In this case you should not specify 'RunProgram' or 'ExecuteFile' in the config file. 'AutoInstall' or 'AutoInstallX' may be specified in the config file, but should not be invoked via the command line or with the [SHIFT] key. If you specify 'RunProgram' or 'ExecuteFile' or invoke 'AutoInstall' and 'AutoInstallX', the specified executable will be launched after the extraction. |
OverwriteMode="x" |
Where x = 0, 1 or 2 (must be enclosed in quotes)
You can alter the config file parameter from the command line by using '-omX' switch. |
RunProgram="command_executing" |
Execution command (multiple instances are allowed). Native 7-zip SFX parameter. Contains the executable file name. Can also contain: the executable file path (environment variables supported by the module are allowed as well as relative paths), prefixes and switches for the executable file. For example, RunProgram="notepad.exe" RunProgram="C:\\Windows\\system32\\notepad.exe" RunProgram="%Path%\\notepad.exe" RunProgram="fm0:nowait:7z_EN.chm" RunProgram="\"%%T\\Reader7Rus.msi\" /qn" RunProgram="hidcon:fm0:\"%%S\\install.cmd\" /Q" In the last two cases the executable file path and name are enclosed in additional quotes because of the switches for the executable file. Prefixes and switches do not need to be enclosed in additional quotes. |
SelfDelete="1" |
Deletes the SFX when the process is over. "1" is the only acceptable value; others will be ignored. This function works IF AND ONLY IF the SFX was launched from the hard drive. The function will not work if the SFX was launched from other devices (CD-ROM, Floppy, Flash, Network drive, etc). You can alter the config file parameter from the command line by using '-sdX' switch. |
SetEnvironment="variable=string" |
Environment variable creation command (multiple instances are allowed). 'variable' - variable name. It should not match the variables already supported by the module. Variable names are NOT case sensitive. 'string' - variable value. Environment variables already supported by the module can be used as a part of 'string'. Examples: SetEnvironment="Var1=E:\\totalcmd" SetEnvironment="Var2=E:\\totalcmd\\\" SetEnvironment="Var3=\"E:\\totalcmd\"" SetEnvironment="Var4=\"E:\\totalcmd\\\"" SetEnvironment="TC=\"%ProgramFiles%\\totalcmd\"" SetEnvironment="Var5=%%S\\TOOLS\\Total Commander" SetEnvironment="PathTC=%ProgramFiles%\\totalcmd" SetEnvironment="Var7=%PathTC%\\" SetEnvironment="Var8=\"%PathTC%\"" SetEnvironment="Timer=30" After creating a variable, it can be used in the following ways: AutoInstall="hidcon:cmd /c copy rdm.txt %Var2%DOC" RunProgram="cmd /c xcopy \"%%T\" %TC% /s /e /i /y" RunProgram="fm%timer%:hidcon:cmd /c echo" AutoInstall2="cmd /c xcopy Lang \"%Var8%Lang\" /s" AutoInstall2="hidcon:cmd /c copy ReadMe.txt %Var9%" AutoInstall2="hidcon:cmd /c copy Hist.txt %VAR9%" AutoInstall2="hidcon:cmd /c copy Keyb.txt %var9%" The variables created with 'SetEnvironment' parameter can be used in other module parameters as well as in programs (.cmd, .bat files) launched from the module. |
Shortcut="type,{src_file_path}, |
Shortcut creation command (multiple instances are allowed). Each value (except for 'type') must be enclosed in curly brackets aka braces. The values are separated by commas. The required values are 'type' and 'src_file_path'. Use the empty braces '{}' for the values you don't need, although you can omit all empty braces after the last value specified. If you need to include braces in the text (e.g. in the shortcut description), use double braces. For example, {"This is a description {{with braces}}"} results in "This is a description {with braces}". Paths 'src_file_path' and 'icon_file' parameters do not need to be enclosed in quotes; however, remember about double backslashes. 'type' - one or two symbol field that can take the following values:
The shortcuts are created for ALL USERS. In order to create a shortcut for the current user only, add 'u' to the values listed above. For example, Shortcut="Du, {cmd.exe}" creates shortcut on the current user's Desktop only. 'src_file_path' - name (and may be the path) of the file for which the shortcut is created. Do not forget to use DOUBLE backslashes when specifying the path. 'command_line_for_file' - command line parameters for the file. 'folder_for_shortcut' - folder in which the shortcut is created. Shortcut="Pu, {cmd.exe}, {/?}, {test}" creates the shortcut by the name of "cmd.lnk" and the parameters "cmd.exe /?" in the "test" folder of the current user's "Start->Programs" menu. 'description' - shortcut description. 'shortcut_name'- the shortcut name WITHOUT EXTENSION. If the value is not specified, the source file name is used and the 'lnk' extension is added to it. For example, Shortcut="P, {cmd.exe}, {/?}, {test}, {Run cmd}, {Run Command Line Help}" creates the shortcut by the name of "Run Command Line Help.lnk" and the command line parameter "cmd.exe /?" in the "test" folder of All Users' Start/Programs menu. 'working_directory'- fills in the shortcut's "Start in:" field. 'icon_file' - path and name of the file containing the shortcut icon. 'icon_index' - icon number in file specified in 'icon_file'. You can specify as many 'Shortcut' strings as you wish. They will be processed in the order of appearance in the config file. |
Appearance |
|
ExtractDialogWidth="x" |
Specifies the MINIMUM extraction dialog window width, where "x" is the window width in pixels. |
ExtractPathWidth="x" |
Specifies the MINIMUM width for the extraction path dialog windows (stand-alone 'ExtractPath' and combined 'BeginPrompt' + 'ExtractPath'), where "x" is the window width in pixels. If after text formatting the window width is smaller than the specified value, the width is adjusted according to the value. |
GUIFlags="x" |
A set of flags for changing the extraction dialog appearance, where "x" is a sum of the numeric values or a summation expression like "2+4+128+1024". You can use any order of numeric values in the summation expression. The numeric values define the following properties:
For example, in order to display the extraction percentage under the progress bar instead of the window title, display the extraction path in a separate dialog window and display the icon in this window, you need to specify GUIFlags="2+4+128+1024" or GUIFlags="1158" (because 2+4+128+1024=1158). Attempts to add an already set filag are ignored. For example, if you try to specify GUIFlags="137+1" ("1+8+128+1") that will not make GUIFlags="138". Instead, the last "+1" will be ignored, because flag 1 has already been set. This parameter can be altered from the command line with '-gfX' switch. |
GUIMode="x" |
Where x = 1 or 2 (always in double quotes, i.e. GUIMode="2")
You can override this parameter from the command line by specifying the '-gmX' switch. |
Progress="x" |
Where x = "yes" or "no" (must be enclosed in quotes, i. e. Progress="no"). Native 7-zip SFX parameter. Progress="no" is equivalent to GUIMode="2". If the config file contains 'GUIMode' (or '-gmX' is used in the command line) along with 'Progress', the latter will be ignored. This is because 'GUIMode' and '-gmX' override 'Progress' parameter. |
Text |
|
Title="new_title" |
Changes the default title ("7-zip SFX") for the following dialog windows 'BeginPrompt', 'CancelPrompt', 'FinishMessage' and 'HelpText'. Native 7-zip SFX parameter. If this parameter is missing, the SFX archive name without extension is displayed instead. If the SFX archive name can not be determined, the default value is displayed. |
BeginPrompt="some_text" |
Displays a message in a dialog window when SFX is launched. Native 7-zip SFX parameter. Depending on the presence of flag 64 in 'GUIFlags' parameter the window may look differently. The screen shot on the left is taken with flag 64 absent. If flag 64 is present, the 'BeginPrompt' dialog window is combined with the editable extraction path field, as shown on the screen shot below. You can suppress this window (if specified) with the following command line switches: '-ai', '-aiX' and '-y'. |
ExtractPathText="some_text" |
The text above the editable extraction path field (which is "Extraction path:" by defult). The screen shot on the left demonstrates the combined ' BeginPrompt' + 'ExtractPath' dialog window (flag 128 of 'GUIFlags' parameter is absent). The path in the extraction field is retrieved from 'InstallPath' parameter, but it can be altered by user. If the 'InstallPath' value is not present in the config file or the path was deleted by user from the interactive extraction dialog, the archive will be extracted to a temporary folder. This temporary folder will be deleted after the extraction and execution of all commands. |
ExtractPathTitle="title_text" |
Changes the extraction path dialog window title (which is "Extraction path" by defult). This parameter is used only for the stand-alone extraction path dialog window (invoked with flag 128 of 'GUIFlags' parameter) for specifying the extraction path, as shown on the left. If flag 128 is absent, 'ExtractPathTitle' parameter will be ignored. For the combined dialog window (flag 64 of 'GUIFlags' parameter) the value is retrieved from 'Title' parameter, as shown on the screen shot above. Flag 1024 of 'GUIFlags' parameter forces the icon appearance in the extraction path dialog window, as shown on the left. It only works together with flag 128. If flag 128 is absent, flag 1024 is ignored. |
ExtractTitle="new_title" |
Changes the extraction dialog window title (which is "Extracting" by default). You can specify something like "Preparing the installation". Flag 32 of 'GUIFlags' parameter forces the icon appearance in the extraction dialog window, as shown on the left. By specifying GUIMode="1" you can hide the "Cancel" button and disable the "Close" button (in the window title bar). By specifying GUIMode="2" you can completely hide the extraction window. |
ExtractDialogText="text" |
Displays the specified text ABOVE the extraction progress indicator (Progress Bar).
If this parameter is not specified, the text will not be displayed. |
ExtractCancelText="button_text" |
Changes the button text in the extraction dialog window from "Cancel" (default) to the
specified one. |
CancelPrompt="cancel_dialog_text" |
Displays a dialog window with the text of your choice (by default: "Really cancel installation?") in order to confirm the cancellation from any dialog window. If flag 256 of 'GUIFlags' parameter is absent, 'CancelPrompt' parameter is ignored and the window is not displayed. Otherwise, the window is displayed with the text specified in 'CancelPrompt' or default text. You can suppress the window from the command line with '-y' switch. |
ErrorTitle="title_for_errors_windows" |
The error window title. Hopefully, you won't see any . The default title is "7-Zip SFX: error". If this parameter is not specified, the SFX archive name (without the extension) is displayed with ":error" appended to it. If the SFX archive name can not be determined, the default value is displayed. The actual text of error messages is defined by the module itself. |
FinishMessage="finish_message" |
After finishing all operations (extraction, program execution, file deletion, shortcut creation, etc) a dialog window with 'FinishMessage' text is displayed. Note that invoking any automated installation ('AutoInstall' or 'AutoInstallX') automatically (this module is very unattended-oriented ) blocks the completion message. You can force the 'FinishMessage' appearance from the command line with two switches: '-fm1' or '-fmN'. You can suppress the window with -'fm0' or '-y' switch. Also, for a specific scenario (for example, for a certain 'AutoInstall', 'RunProgram' or 'ExecuteFile' parameter) you can use 'fmX' prefix. For instance, AutoInstall="hidcon:fm1:install.bat" displays the message, even though this is an automated installation. On the other hand, RunProgram="nowait:fm0:setup.exe" blocks the 'FinishMessage' appearance. Command line switches override the config file parameters. You can substitute a number 2...999 instead of X y into the '-fmX' switch or 'fmX' prefix. The countdown is displayed on the "OK" button. When time expires, the window closes and the module finishes its operation. |
HelpText="some_text" |
Lets you specify the help text that can be displayed by invoking the SFX archive with '-h' or '-?' switches. The dialog window with the 'HelpText' and the "OK" button appears. Closing the window completes the module operation (i.e. nothing will be unpacked or executed). You can use this message for listing the installation scenarios, command line switches and any other information. |