Hello,
I'm making an installation with WiX that have "Launch an application after install" checkbox. The goal is to have reaction on set checkbox as well as on unset checkbox. I case checkbox is set I need to run an application. In case checkbox is not set I need to run the same application but with command line argument.
Here is a part of my wix script.
<CustomAction Id="StartConfigManagerOnExit" FileKey="ParamsShower.exe" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait" />
<CustomAction Id="StartUpgradeConfigOnExit" FileKey="ParamsShower.exe" ExeCommand="/upgrade" Execute="immediate" Impersonate="yes" Return="asyncNoWait" />
<UI>
<Publish Dialog="ExitDialogEx" Control="Finish" Order="1" Event="DoAction" Value="StartConfigManagerOnExit">LAUNCHAPPONEXIT = 1</Publish>
<Publish Dialog="ExitDialogEx" Control="Finish" Order="1" Event="DoAction" Value="StartUpgradeConfigOnExit">LAUNCHAPPONEXIT = 0</Publish>
<Publish Dialog="ExitDialogEx" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Dialog Id="ExitDialogEx" Width="370" Height="270" Title="[ProductName] Setup">
<Control Id="LaunchCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40" Property="LAUNCHAPPONEXIT" Hidden="yes" CheckBoxValue="1" Text="Launch an app">
<Condition Action="show">NOT Installed</Condition>
</Control>
</Dialog>
<InstallUISequence>
<Show Dialog="ExitDialogEx" OnExit="success" />
</InstallUISequence>
<AdminUISequence>
<Show Dialog="ExitDialogEx" OnExit="success" />
</AdminUISequence>
</UI>
An installation starts the application when LaunchCheckBox is set. But doesn't run it in case checkbox is not set. Please help.