开发者

How to force an MSI to be installed without restarting any components - but force a reboot instead

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开发者_如何学Go, 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?


  1. Use the various restart manager MSI properties to prevent the Restart Manager from kicking in (specifically MSIRESTARTMANAGERCONTROL=DisableShutdown)
  2. Add a ScheduleReboot action to prompt the user to reboot on completion of installation


You can force a system restart by scheduling a ForceRoboot action. You can condition the execution of this action to suit your needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜