-
Notifications
You must be signed in to change notification settings - Fork 17
Return Codes
All return codes are passed from the inner instance to the outer instance and from the uninstaller to the installer.
All error codes are in decimal notation for easier debugging.
In order to get the return code of the uninstaller (from the NSIS script, Windows command-line or a program), it has to be executed with the _?
parameter to prevent it from copying itself to the temporary directory (see the demos).
The standard NSIS return codes are supported. They are:
Normal execution (no error).
Installation aborted by user (Cancel button).
Installation aborted by script.
The following are additional return codes defined by the script:
Invalid combination of command-line parameters.
Elevation is restricted by MULTIUSER_INSTALLMODE_ALLOW_ELEVATION
or MULTIUSER_INSTALLMODE_ALLOW_ELEVATION_IF_SILENT
.
Returned from the uninstaller when no version is installed.
Returned by the outer instance when the inner instance cannot start (user aborted elevation dialog, Logon service not running, UAC is not supported by the OS, user without admin privileges is used in the runas dialog), or was started, but did not have admin rights.
Returned by the inner instance when the user presses the Back button on the first visible page (display outer instance).
All other codes are Windows error codes returned by the GetLastError
function.