我读了一篇文章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>
但我希望默认选中复选框,而不是取消选中。怎么做
答案 0 :(得分:11)
添加<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"/>