Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以将功能状态和操作保存到属性值中吗?喜欢 <Property id="prop" Value=[!MyFeature]" />
如果不可能,我如何在自定义操作中获得功能状态?仅使用 msi.dll 中的 MsiGetFeautureState?
状态运算符不可格式化,所以是的,您应该使用 MSI API(或 DTF 中的 FeatureInfo 等包装器)获取状态。
您可以尝试使用将自定义属性设置为格式化文本的自定义操作,例如设置为“1”。然后可以使用功能状态来调节此自定义操作。
这样,仅当功能状态是您想要的并且您不需要使用自定义代码时才设置属性。