安装应要求关闭所有浏览器:iexplore.exe、chrome.exe 和 firefox.exe,但应提示用户这样做。我无法显示 FileInUse 对话框。以下是相关部分 - 我错过了什么?使用 CloseMessage="yes",它们都会关闭,但我希望 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.