WiX installer Bundle Launch App after install

2019-09-01 07:40发布

问题:

I have one bundle that includes PackageGroupRef for NetFx45Web, one ExePackage for needed driver and MsiPackage for my app. I want to launch my app after whole installation process completes. I tried using

<Property Id="WixShellExecTarget" Value="[#myEXE]" />
    <CustomAction Id='LaunchFile'
        BinaryKey="WixCA"
        DllEntry="WixShellExec"
        Impersonate="yes"/>

in my app MsiPackage but it starts the app before installation is complete(when MsiPackage completes).

回答1:

Create a variable like this, in your bundle.wxs:

<Variable Name="LaunchTarget" Value="[ProgramFilesFolder]\YourFolder\YourExe.exe"/>