问题描述
使用Windows Installer 4.0和Restart Manager,可以安全地假设"Restart Manager"将负责关闭应用程序,因此不需要任何自定义操作来处理持有文件的进程的关闭,这意味着要更新吗?
With Windows installer 4.0 and Restart Manager, would it be safe to assume that "Restart Manager" would take care of shutting down applications and hence there is no need for any sort of custom actions to handle shutdown of processes holding files, meant to be updated?
在重启管理器"可能无法关闭应用程序的情况下,是否有例外?当然,我知道当强制执行诸如DisableAutomaticApplicationShutdown之类的策略时,重新启动管理器将被禁用.
Are there any exceptions where "Restart Manager" might not shut down applications?Ofcourse, i understand that when a policy such as DisableAutomaticApplicationShutdown is enforced, Restart Manager is disabled.
要关闭的进程是否必须满足某些条件才能通过重启管理器关闭?
Does the process to be shutdown have to satisfy some criteria to be able to be shutdown by Restart Manager?
我正在默默运行我的msi软件包.
I am running my msi packages silently.
即使启用了重新启动管理器",如果msi程序包要求重新启动,我该怎么办?
What do i infer if a msi package requests for a reboot, even if "Restart Manager" is enabled?
任何回应将不胜感激.
关于,基兰·黑德(Kiran Hegde)
Regards,Kiran Hegde
推荐答案
重新启动管理器主要是一种比以前更好的检测方案,用于检测安装操作期间正在使用的文件.例如,旧方案仅检测到具有顶级窗口的正在运行的应用程序(托盘应用程序除外).唯一会自动关闭并重新启动的应用是已注册执行此操作的应用.基本上,这意味着您的应用程序调用RegisterApplicationRestart()告诉它您希望使用哪个命令行重新启动.该应用程序监视WM_QUERYENDSESSION消息,通知该消息它即将关闭,并为随后的重新启动写入恢复信息.
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.
此处示例:
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.
当应用程序不执行此工作时,人们通常会诉诸WiX Util CloseApplication调用之类的方法来将其关闭.
When apps don't do this work people usually resort to things like WiX Util CloseApplication calls to shut them down.
请注意,标记为安装时停止"(或视情况而定,卸载)的服务不会导致使用文件的情况.使用中文件检测机制将忽略ServiceControl表中标记为已停止的服务正在使用的文件.因此,服务通常很好,但是如果服务产生其他进程,则可能导致使用文件的情况.
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.
这篇关于使用Windows Installer重新启动Manager行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!