Wix - run exe (with arguments) at the end of the installation, which was not installed by the current MSI

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=&quot;MySplash.bmp&quot;" 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.

+6
source share
1 answer

You tried to change Execute = "commit" to Execute = "postponed", this will cause the user action to be launched after the installation of the script is started, but not after the installation process is complete, for the latter you will be out of context of the installation.

+2
source

Source: https://habr.com/ru/post/952677/


All Articles