WIX:如果选择了特定功能,则显示页面

时间:2016-12-20 16:53:15

标签: wix

我创建了msi安装程序,此安装程序包含2个要安装的功能。

<Feature Id="StandaloneFeature"
         Title="$(var.StandaloneName)"
         Description ="$(var.StandaloneName)"
         Level="1">
  <ComponentGroupRef Id="xxx"/>      
  <ComponentRef Id="xxx"/>
</Feature>    
<Feature Id="PreCheckerFeature"
         Title="$(var.PrecheckerName)"
         Description="Prerequisites Checker sets system for launching automation scripts."
         Level="2">
  <Condition Level="0">INSTALLLEVEL=3</Condition>
        <ComponentRef Id="xxx"/>
</Feature>

此外,我还有PrcSettingsDlg特定对话框,如果在CustomizeDlg的SelectionTree控件中选择Feature Id="PreCheckerFeature",则需要显示该对话框。我试着用  <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="PrcSettingsDlg" Order="3" ><![CDATA[MsiSelectionTreeSelectedCost ="986"]]></Publish>和  <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="PrcSettingsDlg" Order="3" ><![CDATA[MsiSelectionTreeSelectedFeature ="PreCheckerFeature"]]></Publish>但它不起作用。 你能帮我理解如何创建在UI中显示页面的条件吗?

UPD 我找到了解决方案

<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="PrcSettingsDlg" Order="3" ><![CDATA[&PreCheckerFeature = 3]]></Publish>          
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4"><![CDATA[&PreCheckerFeature <> 3]]></Publish>

也许它会帮助某人。

0 个答案:

没有答案