Question

I have a WIX Project and a Bootstrapper of WIX. I am using Reboot property of WIX to prompt for reboot machine after setup complete its installation. But when i run my msi using Bootstrapper then it did not prompt a message for reboot machine. below is my code that i am using in Product.wxs file in WIX:-

 <Property Id="REBOOT" Value="Force"/>

Now i am using chain of msi in Bootstrapper project below:-

  <Chain>   

  <MsiPackage  SourceFile=".\Bonjour.msi" Compressed="yes" />
  <MsiPackage  SourceFile=".\Security_IDTools.msi" Compressed="yes" />
  <MsiPackage SourceFile ="$(var.BiodentifySetUp.TargetPath)" Compressed ="yes" DisplayInternalUI="yes" />

    </Chain>

But when my last msi run it did not prompt reboot message?

Was it helpful?

Solution 3

Priyanka if you have any plans to continue your installation after reboot then do not use the MSI's reboot prompt with a bootstrapper.
That's because it would effectively abort the bootstrapper and won't give it a chance to resume on reboot if necessary.use <ExitCode Behavior="forceReboot" /> after MsiPackage you want it to restart. After a force reboot, Burn will automatically resume after the reboot and rest of your MSI/Exe would be installed.
But if you dont have any such plans you can go with ScheduleReboot Action in your MSI.

<InstallExecuteSequence>
    <ScheduleReboot After="InstallFinalize"/>
</InstallExecuteSequence>  

This will tell the MSI package to reboot after successful install.
And make sure to check log for any error.

OTHER TIPS

The REBOOT property does not force a reboot, and in the context you're using it is a Windows Installer property not a WiX property. The REBOOT property tells Windows what behavior should occur when a reboot occurs. You need a ScheduleReboot action in your MSI file if you want a reboot at the end of an MSI install and want to ask for it, or a ForceReboot if you want to just do it, as Nimish says.

There is also the question of why you want to force a reboot in the first place. Windows will reboot if something happens that requires one - there's no need for you to assume that a reboot is required just because an install has finished.

A Reboot may be necessary due to the stupid behavior of events and security in Windows 8 (and even in windows 7). That is the "easiest" way to make sure all of your services have been started correctly. I would expect that as already mentioned would be the best choice so that there is no abort of the bootstrapper in the middle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top