使 WIX 中的功能不可用而不是隐藏它

Make feature in WIX unavailable instead of hiding it

我有一个条件,根据目录搜索,它会禁用防止覆盖文件的功能。但我真正需要的是将选择树中的特征设置为 "Entire feature will be unvailable" 而不是隐藏整个特征。

有什么办法吗?

<Feature Id="ProductFeature2" Title="lorem ipsum" Description="dolor sit amet" Level="1" AllowAdvertise="no" Absent="allow">
      <Condition Level="0">
        <![CDATA[CHECKCFGDATA<>"NOTEXIST"]]>
      </Condition>
      <ComponentGroupRef Id="Component1" />
      <ComponentGroupRef Id="Component2" />
    </Feature>

Windows 安装程序本身没有此功能。您可以将级别设置为大于 INSTALLLEVEL 属性(默认值 100),它不会被安装,但它只会说不会被安装。用户仍然可以 select 安装它,除非你实施了一些额外的逻辑来防止在你的 属性 说它不应该安装并且他们正在尝试安装它时过渡到下一个屏幕。

任何想要获得更像您要求的用户体验的尝试都需要编写自定义 UI 处理程序。