【发布时间】:2014-12-20 13:25:56
【问题描述】:
我在 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>
我开始怀疑是否曾经使用过值 5,但我又一次发现我很难相信我无缘无故地把它放在那里。
【问题讨论】:
-
我怀疑当可以添加或删除功能时,它可能在维护模式下具有 INSTALLSTATE_DEFAULT 值,并且当功能不会发生任何事情时,功能操作被设置为默认值。这当然是一种猜测,但将其设置为任何其他值都会误导,因为它表明该功能将会发生什么。
标签: wix windows-installer wix3.6