Skip to content

Parameters

alexmitev81 edited this page Feb 27, 2017 · 5 revisions

Standard NSIS Parameters

/S

Set silent mode, requires /allusers or /currentuser parameter, case-sensitive

/D

Installer only, set install directory, must be the last parameter, without quotes, case-sensitive. If AllowRootDirInstall false is used (the default setting), this parameter will ignore values, which are root drives like C:\.

Usage:

start Setup.exe /D=%PROGRAMFILES%\My Program
start Setup.exe /D=C:\Program Files\My Program

NsisMultuUser parameters

/allusers

Install or uninstall for all users, case-insensitive. Can be used both in silent and non-silent mode.

  • MULTIUSER_ERROR_INVALID_PARAMETERS error level is returned if uninstaller finds there's no per-machine installation or if /currentuser parameter is also present.
  • MULTIUSER_ERROR_ELEVATION_NOT_ALLOWED error level is returned if elevation is required and is not allowed.

/currentuser

Install or uninstall for current user only, case-insensitive. Can be used both in silent and non-silent mode.

  • MULTIUSER_ERROR_INVALID_PARAMETERS error level is returned if uninstaller finds there's no per-user installation or if operating system is not NT (95/98/ME) or if /allusers parameter is also present.
  • MULTIUSER_ERROR_ELEVATION_NOT_ALLOWED error level is returned if elevation is required and is not allowed (installer only, when MULTIUSER_INSTALLMODE_ALLOW_BOTH_INSTALLATIONS is 0 and there is per-machine installation, which needs to be removed).

/uninstall

Installer only. Run uninstaller, requires /allusers or /currentuser parameter, case-insensitive.

  • MULTIUSER_ERROR_INVALID_PARAMETERS is returned if there is no corresponding installation.
  • In all other cases, the return code from the uninstaller is returned.

/?

Display help dialog, unless MULTIUSER_INSTALLMODE_NO_HELP_DIALOG is defined. All other parameters are ignored.