我是 Windows Installer 和 Wix 的新手,所以请原谅新手的问题。
我正在使用 WixUI_InstallDir 并添加了一个自定义对话框,该对话框在 LicenseAgreementDlg 之后和 InstallDirDlg 之前显示 3 个复选框。只有当第一个复选框被选中并且安装程序第一次执行时,有没有办法有条件地在 ExitDialog 上显示“启动安装的应用程序”复选框?
在我的 wxs 文件中,我有
<!-- Property for each checkbox value (first checkbox checked by default) -->
<Property Id="Checkbox1" Value="1"/>
<Property Id="Checkbox2"/>
<Property Id="Checkbox3"/>
<!-- Custom action to set exit dialog checkbox -->
<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch application."/>
<InstallUISequence>
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="FindRelatedProducts">Checkbox1 = 1 and NOT Installed</Custom>
</InstallUISequence>
<!-- User Interface -->
<UI>
<UIRef Id="WixUI_InstallDir"/>
<UIRef Id="WixUI_ErrorProgressText"/>
<DialogRef Id="MyCheckboxesDlg"/>
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="MyCheckboxesDlg" Order="3">LicenseAccepted = "1"</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="MyCheckboxesDlg">1</Publish>
</UI>
我的问题是,如果我取消选中第一个复选框,则在 InstallUISequence 结束后 Checkbox1 属性值设置为 0,因此仍会显示退出对话框中的启动应用程序。
我应该在哪里设置属性,在 UISequence 或 ExecuteSequence 中?