安装应该要求关闭所有浏览器: iexplore.exe、chrome.exe和firefox.exe,但应该提示用户这样做。我无法让FileInUse对话框出现。这是相关的部分-我遗漏了什么?在CloseMessage=“是”的情况下,他们都很接近,但我想让FilesInUse来代替。
<UI>
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
</UI>
<InstallUISequence>
<Custom Action="WixCloseApplications" Before="AppSearch" />
</InstallUISequence>
<InstallExecuteSequence>
<Custom Action="WixCloseApplications" Before="InstallValidate" />
</InstallExecuteSequence>
<util:CloseApplication Id="CloseIE" CloseMessage="no"
Description="Internet Explorer is still running."
ElevatedCloseMessage="no"
RebootPrompt="no"
Property="IERunning"
Target="iexplore.exe"/>
<util:CloseApplication Id="CloseChrome" CloseMessage="no"
Description="Chrome is still running."
ElevatedCloseMessage="no"
RebootPrompt="no"
Property="ChromeRunning"
Target="chrome.exe"/>
<util:CloseApplication Id="CloseFirefox" CloseMessage="no"
Description="Firefox is still running."
ElevatedCloseMessage="no"
RebootPrompt="no"
Property="FirefoxRunning"
Target="firefox.exe"/>从日志中更新,似乎发生了一些事情,但没有关闭,也没有提示。下面的日志发生了两次(我认为是预期的),一次是在AppSearch之前,一次是在InstallValidate之前,但是从来没有调用过FileInUse对话框。我试着将WixUI_InstallDir改为Mondo,但这并没有帮助。
Action 22:28:12: WixCloseApplications.
Action start 22:28:12: WixCloseApplications.
WixCloseApplications: Entering WixCloseApplications in C:\Users\tim\AppData\Local\Temp\MSIC78D.tmp, version 3.6.2809.0
WixCloseApplications: Checking App: iexplore.exe
WixCloseApplications: App: iexplore.exe found running, 2 processes, setting 'IERunning' property.
WixCloseApplications: Checking App: chrome.exe
WixCloseApplications: App: chrome.exe found running, 7 processes, setting 'ChromeRunning' property.
WixCloseApplications: Checking App: firefox.exe
Action ended 22:28:13: WixCloseApplications. Return value 1.发布于 2012-05-07 17:26:57
在处理了同样的问题一段时间后,我想我可以说,您不能这样解决它,。
问题是只有Win7和Vista有重新启动管理器,允许您检测正在运行的程序,而只允许使用文件的程序。这就是FilesInUse对话框的目的。您现在可能已经意识到,如果没有安装这些文件,就无法使用它们,所以它是存在的:您无法以您尝试的方式解决它。事实上,在WinXP中甚至根本没有重新启动管理器。
我发现的其他解决办法是:
如果你还没有解决这个问题,希望这对你有帮助。
发布于 2015-03-24 15:14:33
旧问题的新答案。希望它能帮上忙。下面是:
在这种情况下,ClosePromtCA应该能很好地工作。它只是强制用户关闭指定的进程-在上面的情况下,chrome.exe,firefox.exe.此外,自定义操作是开源的,因此很容易根据您的需要进行调整。
https://stackoverflow.com/questions/10327273
复制相似问题