Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX - start application after install

Tags:

wix

autostart

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

like image 353
Oleg Sh Avatar asked Jun 06 '13 17:06

Oleg Sh


People also ask

How do I run an application after installing?

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.

What is WiX Installer used for?

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.

What is WiX Bootstrapper?

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.


1 Answers

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"/>
like image 68
Bob Arnson Avatar answered Oct 13 '22 00:10

Bob Arnson