WIX:如何根据运行安装程序的操作系统更改注册表项? [英] WIX: How can the registry key be changed based on the OS on which the installer is running?

查看:25
本文介绍了WIX:如何根据运行安装程序的操作系统更改注册表项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过以下方式设置注册表项

I want to set registry keys in following way

如果操作系统是 Vista 那么HKLM\MyKey1\MyValue=1别的HKLM\MyKey2\MyValue=1

if OS is Vista then HKLM\MyKey1\MyValue=1 else HKLM\MyKey2\MyValue=1

我知道如何在 WIX 中设置注册表项,但似乎无法在元素上设置条件.

I know how to set Registry keys in WIX but it seems the condition cannot be set on element.

推荐答案

从技术上讲,您应该使用两个不同的组件来安装这些注册表项,因为它们是完全不同的路径.然后,您可以使用 VersionNT 属性来调节组件.

Technically speaking, you should use two different Components to install those Registry keys since they are completely different paths. Then you can Condition the Components with the VersionNT property.

这篇关于WIX:如何根据运行安装程序的操作系统更改注册表项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆