TempMode=[@set:user],[Question],[Title]
This command forces SFX to create a temporary folder, extract all files to it, start the program specified in Setup command and remove the temporary folder with its entire contents after completing Setup program. SFX automatically sets the silent mode to 2 to skip the start dialog when performing these steps, but it can be overridden by Silent command with another parameter. Temporary folder with unpacked files is set as the current folder for setup program.
TempMode command can have several optional parameters.
If @set:user parameter is present, SFX attempts to modify permissions of temporary folder, so only the current user can access it. By default, newly created folders might include permissions for several other users additionally to current one. In some special cases it might be associated with security risks, such as a local user able to replace files in a temporary folder, even when SFX is started under system account.
Some installers might fail to start in a folder created with @set:user parameter.
Two other optional string parameters are treated as a question and question title displayed before extraction. If they are present, extraction is started only if user selects "Yes" button. These parameters can be resided before or after @set:user parameter.
If TempMode command is present, a script should also have Setup command. Path command is ignored in this mode.
In TempMode SFX needs to detect the termination of setup program to delete temporary files. Such approach works correctly if setup program is not terminated before installation is done. But sometimes a setup program starts a child process and terminates, expecting a child process to complete installation. In such case SFX deletes temporary files immediately after detecting that main setup application is finished, resulting in malfunctioning child process. So TempMode works correctly only with those setup programs, which do not start another processes or, at least, are not terminated until all child processes are finished.
TempMode
TempMode=Do you wish to install Calculator 3.05, Calculator setup
TempMode=@set:user, Do you wish to install Calculator 3.05, Calculator setup