小编Dan*_*iel的帖子

WiX - 功能条件不起作用

我有一个 Wix-Installer 并向我的 TargetFolder-Selection-Dialog 添加了一个单选按钮组:

  <Property Id="INSTALLATION_TYPE" Secure="yes" Value="Server"/>
  <RadioButtonGroup Property="INSTALLATION_TYPE">
    <RadioButton Height="17" Text="Client" Value="Client" Width="342" X="0" Y="0" />
    <RadioButton Height="17" Text="Server" Value="Server" Width="342" X="0" Y="18" />
  </RadioButtonGroup>
Run Code Online (Sandbox Code Playgroud)

在服务器和客户端之间切换时,以下输出将打印到 MSI 日志文件中:

MSI (c) (04:B4) [17:17:56:295]: PROPERTY CHANGE: Modifying INSTALLATION_TYPE property. Its current value is 'Server'. Its new value: 'Client'.
Run Code Online (Sandbox Code Playgroud)

我的功能表锁定如下:

  <PropertyRef Id="INSTALLATION_TYPE"/>
  <Feature Id="CommonFeature" Level="1" Title="Common Feature">
    <ComponentGroupRef Id="Common"/>
    <ComponentGroupRef Id="RegistryKeys"/>

    <Feature Id="FeatureServer" Title="Server" Level="2">
      <Condition Level="1"><![CDATA[INSTALLATION_TYPE="Server"]]></Condition>
      <ComponentGroupRef Id="Server"/>
      <ComponentGroupRef Id="AdminConsole"/>
    </Feature>

    <Feature Id="FeatureClient" Title="Client" Level="2">
      <Condition Level="1"><![CDATA[INSTALLATION_TYPE="Client"]]></Condition>
      <ComponentGroupRef Id="Client"/> …
Run Code Online (Sandbox Code Playgroud)

windows-installer wix

5
推荐指数
1
解决办法
1451
查看次数

标签 统计

windows-installer ×1

wix ×1