title: Wix - Run an exe ( with arguments ) at end of install, which wasn't installed by current MSI
body: <p>I have a MSI created in WiX 3.6 that obviously installs various things and creates a shortcut to an exe that isn't actually installed by my MSI ( we know for certain that the exe is located in a specific folder, because it's installed by a seperate MSI, that is a required pre-req for my MSI ).  The shortcut we create, passes in some arguments that actually tell the exe to use stuff that we've just installed.  This all works fine, but I now want the MSI to automatically run the exe with the same arguments as we use in the shortcut.</p>
  
  <p>I tried following this article - <a href="http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html" rel="noreferrer">http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html</a> but it assumes you want to run an exe you have just installed and doesn't seem to use exe arguments.</p>
  
  <p>I also tried using a custom action like - </p>
  
  <pre><code>&lt;CustomAction Id="RunMainApp"
            Directory="FREDFOLDER"
            ExeCommand="[FREDFOLDER]Fred.exe -SBDSingleApp -SBDSplash=&amp;quot;MySplash.bmp&amp;quot;"
            Execute="commit"
            Return="ignore"/&gt;
  
  &lt;InstallExecuteSequence&gt;
    &lt;Custom Action="RunMainApp" Before="InstallFinalize" /&gt;
  &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>this was more promising - it ran the exe, but did so before the actual installation had finished - which obviously isn't correct.</p>
  
  <p>To be honest, I'm not that bothered if about having a UI as in the first example - because 90% of the time the MSI will be run in quiet mode without the wizard been displayed.</p>