SFX commands: SetupCode


SetupCode

If this command is present, SFX archive waits until a program specified in Setup or Presetup command finishes and uses its exit code increased by 1000 as the exit code of SFX executable.

If SFX failed to run a setup program because of some error, it returns its own error codes, which are the same as WinRAR exit codes. For example, if SFX execution is failed because of checksum error, SFX process will return 3. If SFX successfully started a setup application and it is completed with zero code, SFX will return 1000. If setup program returned 10, SFX will return 1010.

So if SetupCode code is specified and SFX exit code is less than 1000, something went wrong and setup was not even started. If setup application uses 0 code to define success and non-zero for failure, SFX exit code 1000 indicates a success and anything else is a failure.

If several Setup and Presetup commands are used and SetupCode is present, SFX will wait for every Setup and Presetup command and return a largest code returned by setup applications.

Example

Setup=setup.exe

SetupCode




Posted on line by http://winrar-france.com