I have an MSI created in WiX 3.6, which obviously installs different things and creates a shortcut for exe that is not actually installed by my MSI (we know for sure that exe is in a specific folder, because it is installed on a separate MSI, which is a prerequisite for my MSI). The shortcut we create conveys some of the arguments that exe actually says to use the material we just installed. All this works fine, but now I want MSI to automatically launch exe with the same arguments as in the shortcut.
I tried to follow this article - http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html , but it is assumed that you want to run the exe that you just installed, and does not 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>
it was more promising - he ran exe, but did it before the actual installation ended - which is obviously wrong.
Honestly, this does not bother me if we use the user interface, as in the first example, because 90% of the time MSI will be launched in silent mode without a wizard.
source share