安裝應該要求關閉所有瀏覽器:iexplore.exe,chrome.exe和firefox.exe,但應提示用戶這樣做。我無法獲得FileInUse對話框。以下是相關部分 - 我錯過了什麼?使用CloseMessage =「yes」,它們都會關閉,但我希望FilesInUse能夠取而代之。Wix:如何使用FileInUse對話框
<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.
WixCloseApplications的其他選項包括運行它Before = LaunchConditions,然後設置一個不是RunningIE的Condition(例如)。如果您沒有設置WixCloseApplications自定義操作,它將在InstallFiles之前發生。但仍然沒有觸發FilesInUse。幫幫我! – tofutim 2012-04-26 07:33:53