title: Closing an application using WiX
body: <p>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.  </p>
  
  <pre><code>&lt;util:CloseApplication Id="CloseServe" CloseMessage="yes" Target="server.exe" ElevatedCloseMessage="yes" RebootPrompt="no"/&gt;
  &lt;InstallExecuteSequence&gt;      
    &lt;Custom Action="WixCloseApplications" After="RemoveExistingProducts" /&gt;
    &lt;RemoveExistingProducts After="InstallInitialize"/&gt;
    &lt;Custom Action='LaunchApplication' After='InstallFinalize'/&gt;
    &lt;!--&lt;Custom Action='StopServer' Before='RemoveExistingProducts'/&gt;--&gt;
  &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>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.</p>