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.
I tried following this article - http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html but it assumes you want to run an exe you have just installed and doesn't seem to use exe arguments.
I also tried using a custom action like -
<CustomAction Id="RunMainApp"
Directory="FREDFOLDER"
ExeCommand="[FREDFOLDER]Fred.exe -SBDSingleApp -SBDSplash="MySplash.bmp""
Execute="commit"
Return="ignore"/>
<InstallExecuteSequence>
<Custom Action="RunMainApp" Before="InstallFinalize" />
</InstallExecuteSequence>
this was more promising - it ran the exe, but did so before the actual installation had finished - which obviously isn't correct.
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.