Skip to content

Variables

alexmitev81 edited this page Feb 27, 2017 · 3 revisions

General Variables

$MultiUser.Privileges

Contains the current user level, returned by the UserInfo plugin. Possible values: Admin, Power (up to Windows XP), User, Guest. If the current user level is Admin or Power, $IsAdmin is set to 1, otherwise to 0.

$MultiUser.InstallMode

Contains the current installation mode. Possible values are AllUsers for per-machine installation and CurrentUser for per-user installation.

$IsAdmin

0 or 1, determines if current user is admin or not. Initialized depending on the current user level returned by the UserInfo plugin.

$IsInnerInstance

0 or 1, determines if the code is executed in the context of the inner instance, initialized via UAC_IsInnerInstance.

$HasPerMachineInstallation

0 or 1, determines whether there is per-machine installation.

$HasPerUserInstallation

0 or 1, determines whether there is per-user installation.

$HasCurrentModeInstallation

0 or 1, determines whether there is installation corresponding to the installation mode in $MultiUser.InstallMode.

$PerMachineInstallationVersion

Contains the version number (DisplayVersion) stored in registry of the per-machine installation or is empty if there is no per-machine installation.

$PerUserInstallationVersion

Contains the version number (DisplayVersion) stored in registry of the per-user installation or is empty if there is no per-user installation.

$PerMachineInstallationFolder

Contains the installation folder (InstallLocation) stored in registry of the per-machine installation or is empty if there is no per-machine installation.

$PerUserInstallationFolder

Contains the installation folder (InstallLocation) stored in registry of the per-user installation or is empty if there is no per-user installation.

$PerMachineUninstallString

Contains the UninstallString stored in registry of the per-machine installation or is empty if there is no per-machine installation.

$PerUserUninstallString

Contains the UninstallString stored in registry of the per-user installation or is empty if there is no per-user installation.

$PerMachineOptionAvailable

0 or 1, specifies whether only per-user radio button is available on page, or both options are available. Will be 0 only when MULTIUSER_INSTALLMODE_ALLOW_ELEVATION is 0 and current user is not admin.

$InstallShowPagesBeforeComponents

0 or 1, use it to hide all pages before Components inside the installer when running as inner instance.

Usage:

!define MUI_PAGE_CUSTOMFUNCTION_PRE PageWelcomeLicensePre
!insertmacro MUI_PAGE_WELCOME

!define MUI_PAGE_CUSTOMFUNCTION_PRE PageWelcomeLicensePre
!insertmacro MUI_PAGE_LICENSE "License.txt"
...
Function PageWelcomeLicensePre		
    ${if} $InstallShowPagesBeforeComponents == 0
        Abort ; don't display the Welcome and License pages for the inner instance 
    ${endif}	
FunctionEnd

$UninstallShowBackButton

0 or 1, use it to show/hide the Back button on the first visible page of the uninstaller

Usage:

!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.PageComponentsShow
!insertmacro MUI_UNPAGE_COMPONENTS
...
Function un.PageComponentsShow
    ; Show/hide the Back button 
    GetDlgItem $0 $HWNDPARENT 3 
    ShowWindow $0 $UninstallShowBackButton
FunctionEnd

$DisplayDialog

0 or 1, internal variable specifying whether dialog will be displayed.

$PreFunctionCalled

0 or 1, internal variable specifying whether the PRE callback for the dialog has been called.

$CmdLineInstallMode

Contains command-line install mode set via /allusers and /currentusers parameters. Possible values are AllUsers and CurrentUser.

$CmdLineDir

Contains the installation directory set via the /D command-line parameter.

Interface Variables

$MultiUser.InstallModePage

Contains the handle to the page created by the nsDialogs plugin.

$MultiUser.InstallModePage.Text

Contains the handle to the label above the two radio-buttons.

$MultiUser.InstallModePage.AllUsers

Contains the handle to the radio-button for per-machine installs.

$MultiUser.InstallModePage.CurrentUser

Contains the handle to the radio-button for per-user installs.

$MultiUser.InstallModePage.AllUsersLabel

Contains the handle to the label for per-machine installs.

$MultiUser.InstallModePage.CurrentUserLabel

Contains the handle to the label for per-user installs.

$MultiUser.InstallModePage.Description

Contains the handle to the label below the two radio-buttons.