[wix-users] Cannot start multiple applications with WixQuietExecCmdLine

George Couch whippet0 at gmail.com
Wed Oct 16 10:49:31 PDT 2019


Hi,



   I am trying to create an MSI installer using WIX 3.11, which installs my
application and then starts two other applications.

However, I am not able to get the two applications to start when I install
it using msiexec in quiet mode (no UI):

msiexec /i "my_app.msi" /qn



After  the first application  is started, the installer blocks until I
close it.  It looks like I need to set my CustomAction to have a return
type of “asyncNoWait”. However, WIX does not allow me to do this. Here is
what my code looks like:

(I am using the notepad and calculator applications to illustrate my
problem):



<Property Id="WixQuietExecCmdLine"
Value='"[WindowsFolder]\System32\notepad.exe"'/>

<CustomAction Id="StartNotePad" BinaryKey="WixCA" DllEntry="WixQuietExec"
Execute="immediate" Return="ignore"/>



<CustomAction Id="SetCalc" Property="WixQuietExecCmdLine"
Value=""[WindowsFolder]\System32\calc.exe"" Execute="immediate" />

<CustomAction Id="StartCalc" BinaryKey="WixCA" DllEntry="WixQuietExec"
Execute="immediate" Return="ignore"/>



<InstallExecuteSequence>

    <Custom Action='StartNotePad' Before='InstallValidate'>UILevel =
2</Custom>

    <Custom Action='SetCalc' After='StartNotePad'>UILevel = 2</Custom>

    <Custom Action='StartCalc' After='SetCalc'>UILevel = 2</Custom>

</InstallExecuteSequence>



The installer blocks when the notepad application is started. Is there a
way to run the applications asynchronously during a silent msiexec
installation?



I based my code on the “Immediate Execution” example found at:

https://wixtoolset.org/documentation/manual/v3/customactions/qtexec.html


Thanks!
George


More information about the wix-users mailing list