cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

Detect if a reboot is required during a UI install.

Okay I have asked this question before, but I did not get anything back that was helpful.

All I basically want to do is at the end of an install, running in UI mode, is that if there is a reboot required that the check box and the launching of the application be turned off so that the app will not be started.

At the moment what happens is that the user checks to box to have the application launched at the end of the install. Once the user hits Finish they are prompted to reboot, so they select Yes and the machine goes into reboot mode. Since the app itself is try to launch at the same time as the reboot the app crashes.

So we just want to prevent this crash by not allowing the user to launch the app if a reboot is required.

Currently I have the following in my condition line to trigger the launching of the app:

Allow for the launching of the app if:
(Not ReplacedInUseFiles) And (Not ISSCHEDULEREBOOT=1)

I thought that these would work, but I guess not.

Is there any other properties that I can be checking to see if a reboot is required?

Thanks,
Labels (1)
0 Kudos
(1) Reply
girishkatti123
Level 7

The Windows Installer REBOOT property can be set to "force", "suppress" and "reallysuppress". This last one raises some eyebrows- here is the break down:

Force
Always prompt for a reboot at the end of the installation. The UI always prompts the user with an option to reboot at the end. If there is no user interface the system automatically reboots at the end of the installation.

Suppress
Suppress prompts for a reboot at the end of the installation. The installer still prompts the user with an option to reboot during the installation whenever it encounters the ForceReboot action. If there is no user interface, the system automatically reboots at each
ForceReboot. Reboots at the end of the installation, for example caused by an attempt to install a file in use, are suppressed.

ReallySuppress
Suppress all reboots and reboot prompts initiated by ForceReboot during the installation. Suppress all reboots and reboot prompts at the end of the installation. Both the reboot prompt and the reboot itself are suppressed. For example, reboots at the end of the installation, caused by an attempt to install a file in use, are suppressed.

Another property, REBOOTPROMPT can be set to Suppress (or just S) so that any reboot performed by the Windows Installer happens automatically without interaction from the user. Setting this property does not initiate a reboot if one is not needed, it only suppresses the display of any prompts for reboots to the user.
0 Kudos