-
Notifications
You must be signed in to change notification settings - Fork 25
Switches
Chris Lake edited this page Jun 13, 2017
·
2 revisions
- The module supports command line switches. The switches are NOT case sensitive. Multiple switches can be passed to the SFX archive sequentially. For example, "sfx.exe -ai -fm1 -gf+256-8" or "sfx.exe /ai /fm1 /gf+256-8" and even like "sfx.exe /Ai -fM1 /GF+256-8".
- The module can pass switches to the executable program inside the SFX archive. The module looks for its native switches (listed on this page) in the command line until it finds the first unsupported switch. If such a switch found, the remaining switches are passed to the executable program inside the archive. For example, you have the following line in the config file: RunProgram="some_program.exe". If you launch the SFX with the command line like "sfx.exe -gm2 /key=1 /silent", the module recognizes its native switch '-gm2' and performs silent extraction of the archive content. The unsupported switches are passed "as is" to the executable in the archive, and therefore the program is invoked with the following parameters: "some_program.exe /key=1 /silent"
- If you need to pass any natively supported switch to the executable inside the archive, you can use '-!' switch.
All switches passed to the executable inside the archive will be passed only to the FIRST program of the installation scenario you invoke. For example, you have the following lines in the config file:
RunProgram="\"%ProgramFiles%\\Setup.exe\""
RunProgram="\"regedit\" settings.reg"
AutoInstall="\"%ProgramFiles%\\Setup.exe\""
AutoInstall="\"regedit\" settings.reg"
After launching the SFX archive as "sfx.exe -gm2 -s -y", switches "-s -y" are passed to the first line, and the following commands are executed:
RunProgram="\"%ProgramFiles%\\Setup.exe\" -s -y"
RunProgram="\"regedit\" settings.reg".
If you invoke an automated scenario by launching the same SFX archive as "sfx.exe -ai -s -y", switches "-s -y" are passed to the third line, and the following commands are executed:
AutoInstall="\"%ProgramFiles%\\Setup.exe\" -s -y"
AutoInstall="\"regedit\" settings.reg"
Extraction and execution
- AutoInstall
- AutoInstallX
- Delete
- Directory
- ExecuteFile
- ExecuteParameters
- InstallPath
- OverwriteMode
- RunProgram
- SelfDelete
- SetEnvironment
- Shortcut
Appearance
Text
- Title
- BeginPrompt
- ExtractPathText
- ExtractPathTitle
- ExtractTitle
- ExtractDialogText
- ExtractCancelText
- CancelPrompt
- ErrorTitle
- FinishMessage
- HelpText
Prefixes
Switches