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

时间:2014-12-20 13:25:56

标签: wix windows-installer wix3.6

我在两年前创建了一个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>

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

2 个答案:

答案 0 :(得分:5)

有趣。这是我能找到的最接近的文档。如您所述,在Conditional Statement Syntax上,记录了值-11234。相关的Examples of Conditional Statement Syntax没有任何5的实例。

MsiGetFeatureState的文档包含msi.h的常量列表。如果你有这个,那么最好在那里查看,但a third party copy列出INSTALLSTATE_DEFAULT,其值为5.此值在KB 884468上得到证实,但只显示{{3} }};类似地,MsiQueryProductState上提到了常量。

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

答案 1 :(得分:2)

Microsoft文档页面上留下了一条评论,指示安装5的状态是&#34;当该功能即将重新安装/修复时#34;。请参阅:https://msdn.microsoft.com/en-us/library/aa368012(v=vs.85).aspx