3
我是Windows Installer和Wix的新手,請原諒這個新手問題。Wix安裝程序 - 基於自定義對話框輸入在ExitDialog上有條件地顯示「啓動應用程序」
我正在使用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中設置屬性?