WiX/MSI:功能操作值5在哪里记录?

Her*_*man 1 windows-installer wix wix3.6

我在2年前创建了一个WiX文件,其中包含对特征操作值5的检查.

值5应指示重新安装/修复,但我找不到任何WiX/msi文档.我发现的页面最多可达4,就像在MSDN上一样.

  <!-- always install if feature will be installed/reinstalled local -->
  <Custom  Action="MyInstallAction" After="InstallFiles">
    <![CDATA[(&ca_feature=3) OR (&ca_feature=5)]]> <!--  <<< HERE  -->
  </Custom>

  <!-- remove if feature is going from local to absent -->
  <Custom  Action="MyUninstallAction" After="RemoveRegistryValues">
    <![CDATA[(&ca_feature=2) AND (!ca_feature=3)]]> 
  </Custom>
  <Custom  Action="UninstallUsbBusDriver" After="RemoveRegistryValues">
    <![CDATA[(&ca_feature=2) AND (!ca_feature=3)]]>
  </Custom>
Run Code Online (Sandbox Code Playgroud)

我开始怀疑是否曾经使用过5值,但是我再次发现很难相信我没有理由把它放在那里.

Mic*_*man 5

有趣.这是我能找到的最接近的文档.就像你提到的,在条件语句的语法,价值观-1,1,2,3,和,4被记录在案.条件语句语法的相关示例没有任何5的实例.

MsiGetFeatureState的文档有一个常量列表msi.h.如果你有这个,那么最好在那里查看,但第三方副本列表INSTALLSTATE_DEFAULT的值为5.这个值在KB 884468上得到证实,但只用MsiQueryProductState显示 ; 类似地,MsiConfigureProduct上提到了常量.

因此,简而言之,值5可能仅在产品的上下文中有效,并且在特征或组件的上下文中无效.