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
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.