Heinzi
Heinzi

Reputation: 172270

Is it possible to have a setup project create a registry value without overwriting an existing one?

I know it can be done with a custom action, but can it be done without it?

Upvotes: 0

Views: 652

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

You probably want something like:

WiX toolset's "Remember Property" pattern

The advantage is you could then use the property in UI in case you want to give the user a chance to see the existing value and then decide to change it or not.

Upvotes: 0

Heinzi
Heinzi

Reputation: 172270

Found the solution myself:

  1. Under Launch Conditions, go to Search Target Machine and create a new Registry Search. This will set an MSI property (e.g. MY_PROPERTY) to that registry value.
  2. In the Registry window, specify the registry key you want to create and, as the Condition, enter MY_PROPERTY = "".

Upvotes: 1

Related Questions