musachy
28th November 2005 22:00 UTC
Detect pending reboot
I have a setup that removes a previous installation of itself and installs again. So the scenario is this, you run the setup, it detects/uninstalls the previous installation, but it needs to reboot, even selecting "Reboot Now", it does not reboot, and goes on with the installation of the new one. Is there any way to avoid this, or detect a pending reboot from one setup to another?
robotmp3
29th November 2005 09:55 UTC
Probably check rebootflag
From Help:
IfRebootFlag 0 noreboot
MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
Reboot
noreboot:
musachy
29th November 2005 14:10 UTC
That was the first thing I tried, it didn't detect that a reboot was pending.
smatte
29th November 2005 17:03 UTC
If you use an other exe to uninstall the previous installation, you'll need to create a file in your uninstaller or a registry key to tell your installer that a reboot is needed.
goldy1064
29th November 2005 17:05 UTC
Just try creating a value in the RunOnce key, this way it will be removed after the reboot and if you check for it after your uninstaller runs, you'll be fine.
musachy
29th November 2005 18:27 UTC
Writing a key to RunOnce is a good solution for me, it seems like it is working. Thanks!