'Migrate entire registry key during installation with WiX
I have a WiX-based installer and I would like to make it automatically migrate all values from one registry key to another.
That is, any values found under HKLM\Software\MyCompany\MyProduct\SomeOldSetting should be copied to HKLM\Software\MyCompany\MyProduct\SomeNewSetting
The values found under the key are dynamically generated and so I can't just write installer logic to migrate the individual values.
Is this possible at all?
Solution 1:[1]
Yes. You'll want to write a custom action that reads the existing keys then add temporary rows to the Registry and RemoveRegistry table. The Windows Installer will take care of writing the new keys and removing the old keys all in a nice compensating transaction.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rob Mensching |
