cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
knoepdan
Level 6

Change Registry dynamically

Hi

Is it possible to change the registry key in a msi project dynamically without resorting to custom actions?

In our specific use case we need to do the following:
1. read in the registry key value from an ini file (probably setting a property via a custom action)
2. set a registry entry using exactly this key

Example:
In the ini file: the value HKEY_LOCAL_MACHINE\SOFTWARE\TEST is defined. We now need to write our values to this key.


It seems to me, that the registry keys must be predefined.
Greetings and thanks in advance
Labels (1)
0 Kudos
(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The keys and values would need to be defined in the MSI package in order for them to be installed by Windows Installer. The value data can be defined with a property reference that would allow it to change dynamically.
0 Kudos
knoepdan
Level 6

The solution is in fact very simple. I wonder how i have missed it previously:

1. Create a property (C_MYPROPERTY)
2. In the component view->registry entry add a registry folder with name of the property in brackets. Example: “[C_MYPROPERTY]”


Its as simple as that!!
0 Kudos