cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fmoraleshtw
Level 3

Howto create a registry key if does not exist

Hi.

In the Basic MSI project it is easy to create registry keys using the "SYSTEM CONFIGURATION" - "REGISTRY" option, but ... how can I check previously if the key exists to do not modify/overwrite the value if exits?

Thks

Labels (1)
0 Kudos
1 Reply
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi,

Within the Component settings (that the registry key belongs to) you will find the "Never Overwrite" settings.
Changing this to "Yes" means that if the file exists on the target machine it won't be overwritten regardless of file versioning rules.

Off the top of my head, I'm not sure if this settings also works with registry keys - but its an easy test to try.

If that doesn't work, you can use "BEHAVIOUR AND LOGIC > system search "
Here you can search for the regstry key and if found it can store its value in a property.
You can then use that Property as a Condition on the component.

I hope this helps,
Stuart

0 Kudos