9

我读了一篇文章http://wix.sourceforge.net/manual-wix3/run_program_after_install.htm并且它有效。

<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>

但我希望默认选中复选框,而不是未选中。怎么做

4

1 回答 1

15

添加<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />以赋予复选框属性其“选中”值。

它超出了UI元素。这是一个完整的例子:

<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"/>
于 2013-06-06T18:40:58.140 回答