Skip to content
⌘ NSIS Forum Archive

Reboot

4 posts

joshhh#

Reboot

I need to reboot computer after installation and uninstallation. i use this code.

!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

;reboot
!define MUI_PAGE_FINISHPAGE_TEXT_REBOOTNOW "Reboot the computer now?"
!define MUI_PAGE_FINISHPAGE_TEXT_REBOOTLATER "Reboot the computer later?"
;reboot

!insertmacro MUI_PAGE_FINISH

;Uninstall pages
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

but it doesn't work. how can i fix it?
Joost Verburg#
The Finish page will prompt for a reboot if the reboot flag is set. This flag is set automatically by /REBOOTOK supporting commands, but you can also set it manually using SetRebootFlag.