[wix-users] Cannot start multiple applications with WixQuietExecCmdLine

George whippet0 at gmail.com
Wed Oct 16 20:13:00 PDT 2019


Hi Edwin,

   Thank you very much for your advice. Your suggestion worked.  :)


Thanks,
George


On 2019-10-16 2:35 p.m., Edwin Castro wrote:
> WixQuietExec waits for the process it starts to finish and it captures 
> any output written to stdout and stderr and writes it to the msi log. 
> That custom action is not intended to fire-and-forget an application.
>
> You wan to use WixShellExec as shown here:
>
> https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html 
>
>
> Step 3 shows how to use WixShellExec. You should be able to schedule 
> it in InstallExecuteSequence as you're currently doing and thus ignore 
> the rest of the UI stuff on that howto.
>
> Since you want to start two application you'll need to custom actions 
> using WixShellExec and two SetProperty custom actions to set 
> WixShellExecTarget prior to execution.
>
> Try something like this (not tested):
>
> <SetProperty Action="SetNotePadCmdLine" Id="WixShellExecTarget" 
> Value=""[WindowsFolder]\System32\notepad.exe"" Before="StartNotePad">UILevel 
> = 2</SetProperty>
> <CustomAction Id="StartNotePad" BinaryKey="WixCA" 
> DllEntry="WixShellExec" Impersonate="yes"/>
>
> <SetProperty Action="SetCalcCmdLine" Id="WixShellExecTarget" 
> Value=""[WindowsFolder]\System32\calc.exe"" Before="StartCalc">UILevel 
> = 2</SetProperty>
> <CustomAction Id="StartCalc" BinaryKey="WixCA" DllEntry="WixShellExec" 
> Impersonate="yes"/>
>
> <InstallExecuteSequence>
>     <Custom Action="StartNotePad" Before="InstallValidate">UILevel = 
> 2</Custom>
>     <Custom Action="StartCalc" After="StartNotePad">UILevel = 2</Custom>
> </InstallExecuteSequence>
>
> --
> Edwin G. Castro
>
>
> On Wed, Oct 16, 2019 at 11:07 AM George Couch via wix-users 
> <wix-users at lists.wixtoolset.org 
> <mailto:wix-users at lists.wixtoolset.org>> wrote:
>
>     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
>
>     ____________________________________________________________________
>     WiX Toolset Users Mailing List provided by FireGiant
>     http://www.firegiant.com/
>




More information about the wix-users mailing list