-
Notifications
You must be signed in to change notification settings - Fork 17
Defines
All defines can be defined before or after (recommended) NsisMultiUser.nsh
is included, but before the MULTIUSER_PAGE_INSTALLMODE
macro is inserted.
Name of the application, without version information. Used to initialize default install directory, default uninstall registry key, default name in Windows Uninstall dialog and for message boxes.
Usage:
!define PRODUCT_NAME "NsisMultiUser MUI2 Full Demo"
Version of the application displayed to the user in Windows Uninstall dialog. When there is installed version, used to render proper texts on page.
Usage:
!define VERSION "1.0"
File name of the main application installed, used to display application icon in Windows Uninstall dialog.
Usage:
!define PROGEXE "calc.exe"
Company (publisher) of the application displayed to the user in Windows Uninstall dialog.
Usage:
!define COMPANY_NAME "My Company"
Default value:
(none)
Installer only. 0 or 1, determines whether user is allowed to have BOTH per-user and per-machine installations. This only affects the texts and the required elevation on the page - if user selects per-user installation, but there is already per-machine installation, he still needs elevation in order to remove the per-user installation and the information for the per-machine installation is displayed on the page. In this case the elevated instance sets the shell var context to current
, although it has admin rights. The actual uninstall of the previous version has to be implemented by script. Note that even if you define MULTIUSER_INSTALLMODE_ALLOW_BOTH_INSTALLATIONS
as 0, there still might be two installations if per-user installation is made first and then per-user installation is made from another account, which has no way to see the first installation.
Usage:
!define MULTIUSER_INSTALLMODE_ALLOW_BOTH_INSTALLATIONS 0
Default value:
1
0 or 1, determines whether to allow UAC screens in the (un)installer. If set to 0 and user is not admin, per-machine radio button will be disabled in the installer. If elevation is always required (both installer and uninstaller), setup will display error message in non-silent mode and exit with an error code. In old versions, it was possible just to define MULTIUSER_INSTALLMODE_ALLOW_ELEVATION
with no value, which is now equivalent to setting it to 1.
Usage:
!define MULTIUSER_INSTALLMODE_ALLOW_ELEVATION 1
Default value:
1
0 or 1, determines whether to allow UAC screens in the (un)installer in silent mode. If set to 0 and user is not admin and elevation is always required, (un)installer will exit with an error code. Generally it is not recommended to set this flag to 1, because a silent (un)installer shouldn't display any dialogs. Also, if you are performing silent remote (un)installs, there might be no user on the remote machine to close the UAC screen. Can be set to 1 only if MULTIUSER_INSTALLMODE_ALLOW_ELEVATION
is defined as 1, or script won't compile.
Usage:
!define MULTIUSER_INSTALLMODE_ALLOW_ELEVATION_IF_SILENT 0
Default value:
0
0 or 1, determines whether per-machine option is pre-selected by default when not running as admin (when set to 0, per-user option will be selected by default in this mode). Only available if MULTIUSER_INSTALLMODE_ALLOW_ELEVATION
is 1. If there's only one installation and it's per-user, it will always be pre-selected. In old versions, it was possible just to define MULTIUSER_INSTALLMODE_DEFAULT_ALLUSERS
with no value, which is now equivalent to setting it to 1.
Usage:
!define MULTIUSER_INSTALLMODE_DEFAULT_ALLUSERS 1
Default value:
0
0 or 1, determines whether per-user option is pre-selected by default when running as admin (when set to 0, per-machine option will be selected by default in this mode). If there's only one installation and it's per-machine, it will always be pre-selected. In old versions, it was possible just to define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
with no value, which is now equivalent to setting it to 1.
Usage:
!define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER 1
Default value:
0
0 or 1, set to 0 for 64-bit installations. This affects the value of $INSTDIR
- $PROGRAMFILES32
or $PROGRAMFILES64
and also sets SetRegView
to 32 or 64.
Usage:
!define MULTIUSER_INSTALLMODE_64_BIT 1
Default value:
0
Installer only. Installation directory to use when there is no installation present. For per-machine installations, this directory is placed under $PROGRAMFILES32
or $PROGRAMFILES64
and for per-user installations, it's placed under $LOCALAPPDATA
or $PROGRAMFILES32
(prior to Windows 2000).
Usage:
!define MULTIUSER_INSTALLMODE_INSTDIR "${PRODUCT_NAME} ${VERSION}"
Default value:
${PRODUCT_NAME}
Registry key name, in which uninstall information is stored, placed under [HKLM|HKCU]\Software\Microsoft\Windows\CurrentVersion\Uninstall
.
Usage:
!define MULTIUSER_INSTALLMODE_UNINSTALL_REGISTRY_KEY "${PRODUCT_NAME} ${VERSION}"
Default value:
${PRODUCT_NAME}
Registry key name, in which install information is stored (currently only MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME
), placed under [HKLM|HKCU]\Software
. If you don't use this define, install information is stored under the uninstall key.
Usage:
!define MULTIUSER_INSTALLMODE_INSTALL_REGISTRY_KEY "${PRODUCT_NAME}"
Default value:
"Microsoft\Windows\CurrentVersion\Uninstall\${MULTIUSER_INSTALLMODE_UNINSTALL_REGISTRY_KEY}"
File name of the uninstaller that you use in the call to WriteUninstaller
. Used to store uninstall information in registry.
Usage:
!define UNINSTALL_FILENAME "${PRODUCT_NAME}_uninstall.exe"
Default value:
"uninstall.exe"
Display name of the application in Windows Uninstall dialog. The plugin adds the text (current user)
to the name of per-user installation in Windows Uninstall dialog.
Usage:
!define MULTIUSER_INSTALLMODE_DISPLAYNAME "${PRODUCT_NAME} ${VERSION} ${BUILD}"
Default value:
"${PRODUCT_NAME} ${VERSION}"
Name of the registry value containing install directory. Placed under MULTIUSER_INSTALLMODE_INSTALL_REGISTRY_KEY
.
Usage:
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "InstallDir"
Default value:
"InstallLocation"
Define this to remove the default dialog that is displayed when the /?
command-line parameter is specified. Use this when you process additional command-line parameters or return new return codes in your script and want to display your own help dialog.