Archive: Usage of the RebootFlag


Usage of the RebootFlag
Hello. Do I understand it right, that the RebootFlag does not have any influence on the program behaviour after the restart? Its value is lost after the restart. So if I want my installer to perform some operations after a restart only, then I have to save the information that the computer was restarted somewhere by myself.

What I want is the following:

Do
1
2
3
check whether the computer was restarted
if no then restart it
if yes do
4
5
6

BR
Ewgenij


you can set the rebootflag at any point in your installer and later use IfRebootFlag to ask for a reboot and/or perform the actual reboot.

IfRebootFlag 0 noreboot
MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
Reboot
noreboot:


to perform what you're looking for you could either write information in the registry or an ini file, or you could launch your installer (-> GetParameters in the manual) using a parameter after the reboot. to relaunch the installer automatically, you could create a shortcut in the autostart menu - which is probably safer than relying on the user to do so. just don't forget to delete the shortcut once everything is set up.

Aha, thank you very much!:)