Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closing an application using WiX

In creating my WiX installer I have run into an issue when trying to close an application before installing the upgrade. Below is an example of how I am attempting to do this.

<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>

Using this example the application does end up closing but the installation gets stalled at that point and then performs a rollback. Could this be due to the fact that the exe is removed prior to trying to close it? I have tried changing the sequence around so that RemoveExistingProducts is performed after the WixCloseApplications but it then gives me an error code 2613.

like image 418
Scott Boettger Avatar asked Nov 13 '09 21:11

Scott Boettger


1 Answers

You could try logging the installation and see what you can track down from there. Try running the installer from the command console like so:

msiexec.exe /i [msi filename] /log [filepath\logfilename.log]
like image 199
Jason Down Avatar answered Sep 27 '22 20:09

Jason Down