Pergunta

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

Foi útil?

Solução

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"/>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top