I am using Inno Setup to copy all entries in the registry from one location to another. Can you please advise on how to do this? Thanks.
Asked
Active
Viewed 57 times
1 Answers
1
There's no easy way to copy registry tree elsewhere.
You can use WinAPI
RegCopyTree
(but you will also need to import and useRegOpenKey
,RegCreateKey
andRegCloseKey
).If you want to stick with plain Pascal Script, you would have to use
RegGetSubkeyNames
andRegGetValueNames
to collect all subkeys and values and copy/write them one-by-one.For some example, see
Copy32BitUninstallKeyTo64bit
in Inno Setup: Keep existing 32-bit installation path for upgrades, use 64-bit path for new installations – though it does copy only all values (and of specific types only), not subkeys

Martin Prikryl
- 188,800
- 56
- 490
- 992