Archive: Reboot


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?


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.


i still don't understand where i must place /REBOOTOK command or reboot flag? :(


If you always want to reboot use SetRebootFlag.