在创建我的WiX安装程序时,我在安装升级之前尝试关闭应用程序时遇到了问题.下面是我试图这样做的一个例子.
<util:CloseApplication Id="CloseServe" CloseMessage="yes" Target="server.exe" ElevatedCloseMessage="yes" RebootPrompt="no"/>
<InstallExecuteSequence>
<Custom Action="WixCloseApplications" After="RemoveExistingProducts" />
<RemoveExistingProducts After="InstallInitialize"/>
<Custom Action='LaunchApplication' After='InstallFinalize'/>
<!--<Custom Action='StopServer' Before='RemoveExistingProducts'/>-->
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)
使用此示例,应用程序最终会关闭,但安装在此时停止,然后执行回滚.这可能是因为在尝试关闭exe之前删除了exe吗?我已经尝试更改序列,以便在WixCloseApplications之后执行RemoveExistingProducts但它然后给我一个错误代码2613.
您可以尝试记录安装并查看可以从那里追踪的内容.尝试从命令控制台运行安装程序,如下所示:
msiexec.exe /i [msi filename] /log [filepath\logfilename.log]
Run Code Online (Sandbox Code Playgroud)