views:

822

answers:

1

I want to set registry keys in following way

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

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

+3  A: 

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.

Rob Mensching
This is exactly how we do it here too, we have some Vista specific registry keys that are in their own component. Works well, no problems :)
sascha
Yes, this seems to be the correct way and works fine. Thanks. I was looking to somehow set a condition on Registry/RegistryValue elements or set a property value conditionally (IF(x) THEN property=a ELSE property=b) and use it as Key. But from various references, I figured out that its not possible.
Callisto

related questions