-
Notifications
You must be signed in to change notification settings - Fork 17
Callbacks
alexmitev81 edited this page Feb 27, 2017
·
5 revisions
Like all other normal NSIS pages, both the MULTIUSER_PAGE_INSTALLMODE and MULTIUSER_UNPAGE_INSTALLMODE pages support the standart PRE, SHOW, LEAVE callbacks:
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.PageInstallModePre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.PageInstallModeShow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.PageInstallModeLeave
!insertmacro MULTIUSER_PAGE_INSTALLMODE
...
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.PageInstallModePre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.PageInstallModeShow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.PageInstallModeLeave
!insertmacro MULTIUSER_UNPAGE_INSTALLMODE
Provide a callback function when the current install mode changes (user toggles between per-machine/per-user installation). Usually you'll want to use this to set the $StartMenuFolder
variable.
Usage:
!define MULTIUSER_INSTALLMODE_CHANGE_MODE_FUNCTION PageInstallModeChangeMode
!insertmacro MULTIUSER_PAGE_INSTALLMODE
...
Function PageInstallModeChangeMode
!insertmacro MUI_STARTMENU_GETFOLDER "" $StartMenuFolder
FunctionEnd
Same as MULTIUSER_INSTALLMODE_CHANGE_MODE_FUNCTION
, but for the uninstaller.
Usage:
!define MULTIUSER_INSTALLMODE_CHANGE_MODE_UNFUNCTION un.PageInstallModeChangeMode
!insertmacro MULTIUSER_PAGE_INSTALLMODE
...
Function un.PageInstallModeChangeMode
!insertmacro MUI_STARTMENU_GETFOLDER "" $StartMenuFolder
FunctionEnd
This callback is still supported in old code, but in new code you should use MULTIUSER_INSTALLMODE_CHANGE_MODE_FUNCTION
instead.
This callback is still supported in old code, but in new code you should use MULTIUSER_INSTALLMODE_CHANGE_MODE_UNFUNCTION
instead.