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

Registry keys replaced during minor upgrade

InstallScript MSI

On new install, my setup creates registry keys for some default window positions using values created in the Registry View. After setup the user can change the window positions which changes the corresponding registry keys.

On minor upgrade, the keys get reset to the original values. Is there a way to prevent this from happening?

I know I could write code to read and restore the old values, but this seems like something that should be taken care of by InstallShield. If I'm forced to do this where is the ideal place to do it AFTER the registry keys have been added?

I would think a lot of people would run into this problem. I would think the default would be to keep registry keys on a minor upgrade. Am I missing something?
Labels (1)
0 Kudos
(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If the component containing the registry entries is being reinstalled, the registry entries will be reinstalled. To prevent this issue, these entries should be in their own component (i.e., no other resources that need to be installed during upgrades should be in this component). Then, one of the registry entries should be marked as the key path of the component (right-click one of the entries and select Set Key Path). In the Components view, select the component containing the registry data and set its Never Overwrite option to Yes. This prevents Windows Installer from installing the component if the component's keypath already exists on a target machine.
0 Kudos
Mark_Koehler
Level 6

Finally got around to trying that approach and it worked like a charm.

Thanks.
0 Kudos