matricen
29th May 2003 17:53 UTC
Reboot xp help
I would be pleased to get a reboot function into my NSIS installer, which is for the Windows XP system.
But I am very confused which function/code I can use, and where to put it. I have not included a finish page.
My english is not that good to understand what to do here. I have read the NSIS documentation and seach this forum, but cant figure it out. Hope that somebody can help me out! :eek:
Joost Verburg
29th May 2003 20:25 UTC
Use the Reboot command to reboot.
If you want to check whether a reboot is required (NSIS has set the reboot flag), use IfRebootFlag.
matricen
29th May 2003 20:33 UTC
thanks alot, but where should I place the command reboot? In the last section or?
Brummelchen
29th May 2003 21:08 UTC
maybe this help
;Uninstaller Functions
Function un.onUninstSuccess
MessageBox MB_ICONINFORMATION|MB_OK " <blah> success"
IfRebootFlag "" norebootdone
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 " <blah> reboot?" IDNO noreboot
REBOOT
Abort
noreboot:
MessageBox MB_ICONINFORMATION|MB_OK "<maybe another info text>"
Goto norebootdone
norebootdone:
FunctionEnd
Afrow UK
29th May 2003 21:28 UTC
So;
Function .onInstSuccess
MessageBox MB_ICONINFORMATION|MB_OK "Installation completed successfully."
IfRebootFlag 0 no_reboot_done
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "To complete the installation, your PC must be rebooted.$\r$\n$\r$\nWould you like to reboot now?" IDNO no_reboot
REBOOT
Abort
no_reboot:
MessageBox MB_ICONINFORMATION|MB_OK "You must do a reboot before you can use ${MUI_PRODUCT}."
no_reboot_done:
FunctionEnd
-Stu
matricen
29th May 2003 22:37 UTC
Great, thanks. It works beautyfull now :-)