I read an article http://wix.sourceforge.net/manual-wix3/run_program_after_install.htm and it works.
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch MS" />
<Property Id="WixShellExecTarget" Value="[#MainExe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<UI Id="MyWixUI_Mondo">
<UIRef Id="WixUI_Minimal" />
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
<UIRef Id="WixUI_ErrorProgressText"/>
</UI>
But I want to have checked checkbox by default, not unchecked. How to do it
To do it from the Execute Immediate sequence follow these steps: Add the Execute Program from Installed File action after InstallFinalize in Execute Immediate. Populate the Action with Action Name, browse to .exe to execute, and add in command lines.
Windows Installer XML Toolset (WiX, pronounced "wicks"), is a free software toolset that builds Windows Installer packages from XML. It consists of a command-line environment that developers may integrate into their build processes to build MSI and MSM packages.
A WiX bootstrapper is a chainer, or an installer that installs multiple MSI files in sequence. It is typically used when an application has multiple dependencies, or when an MSI file needs to be installed before another MSI file can be installed. WiX bootstrappers can be created using the WiX toolset.
Add <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
to give the checkbox property its "checked" value.
It goes outside the UI
element. Here's a complete example:
<UI>
<UIRef Id="WixUI_Minimal"/>
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed
</Publish>
</UI>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With