我读了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>
但是我想默认选中复选框,而不是未选中。怎么做
最佳答案
添加<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
,为checkbox属性赋予其“checked”值。
它超出了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"/>
关于WiX-安装后启动应用程序,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16968845/