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.