Restart Manager behavior with windows installer

我的未来我决定 提交于 2019-12-02 04:39:33

Restart Manager is primarily a better detection scheme (than previously) for detecting the files that are in use during an installation operation. For example, the old scheme detected only running apps with a top level Window (excluding tray apps). The only apps that get automatically closed down and restarted are those that have signed up to do that. Basically that means your app calls RegisterApplicationRestart() telling it what command line you wish to be restarted with. The app watches for WM_QUERYENDSESSION messages that tell it that it's about to be shutdown, and it writes recovery info for its subsequent restart.

Example here:

http://www.advancedinstaller.com/user-guide/qa-vista-restart-manager.html

So some of your questions don't apply, but obviously the point is to prevent reboots, whether it's a silent install or not. If a silent install needs a reboot it will just do it, because silent really means silent, there's nobody to ask, and the install isn't complete until after the reboot.

When apps don't do this work people usually resort to things like WiX Util CloseApplication calls to shut them down.

Note that services that are marked as Stop at Install (or uninstall, as the case may be) do not result in files-in-use situations. The file-in-use detection mechanism ignores files that are in use by services that are marked to be stopped in the ServiceControl table. So services are generally fine, but if the service spawns off other processes then they can result in files-in-use situations.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!