Reputation: 12416
When installing an MSI package, any shared files which get upgraded will automatically force the other components/services that use that file to restart. This is done using the Restart Manager on Windows Vista and above.
In my situation, one of the files being upgraded is a file that belongs to the service which is actually running the install. This service takes control of when to reboot the machine itself, but because it gets restarted, it doesn't get the return code from the MSI process that says it needs a reboot. Hence the machine doesn't reboot, leaving the system in a broken state.
I need some way to prevent this control service being restarted, and instead allow it to reboot the whole system instead. Windows Installer can schedule files to be copied on the next reboot, but how do I force this behaviour in the case of these shared files?
Upvotes: 4
Views: 7512
Reputation: 3565
You can force a system restart by scheduling a ForceRoboot action. You can condition the execution of this action to suit your needs.
Upvotes: 2
Reputation: 22406
Upvotes: 2