我想使用 WIX 检测用户系统上是否安装了特定的 Microsoft 修补程序。实现这一目标的最简单方法是什么?
我已经对此做了一些阅读,但我开始怀疑这是越来越多的工作。
我以为我可以简单地扫描注册表以查找有问题的修补程序。在尝试这样做时,我了解到修补程序 ID 不再存储在注册表中。相反,MSFT 鼓励人们使用他们的 Windows Update API。
显然,WIX 本身并不支持 Windows Update API。这是否意味着我需要利用自定义操作,与 Windows Update API 交互,将结果返回到 WIX,然后使用该结果控制代码流?
I have been doing a bit of reading on this, but I am starting to suspect this is more and more work.
I thought I would be able to simply scan the registry for the hotfix in question. In attempting to do so I learned that hotfix IDs are not stored in registry anymore. Instead, MSFT encourages one to go through their Windows Update API.
Clearly, the Windows Update API is not inherently supported by WIX. Does this mean I need to utilize a custom action, interact with the Windows Update API, return the result to WIX, and then control code flow with that result?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 WMI 的 Win32_QuickFixEngineering 类。您必须编写一个自定义操作来针对该类进行 WMI 查询,以查看是否获得您感兴趣的修补程序的实例,然后使用结果设置 Windows Installer 属性。从那里,您可以根据您的要求在某种条件元素中使用它。
Check out WMI's Win32_QuickFixEngineering class. You would have to write a custom action to make a WMI query against that class to see if you get an instance for the hotfix you are interested in and then set a Windows Installer property with the result. From there you could use it in a condition element of some sort depending on your requirements.