04-20-2010, 01:21 AM
Join Date: Mar 2009
Location: Portland, OR
OS: MS-Dos 6.22 - Win7
Only way to do it in one file is to export the parent key. If these are under
You would export HKEY_CURRENT_USER\Software\MyProgram
If they are divided up under 5 parent keys for example, you just need to export those 5 parent keys.
If they are spread through out HKEY_CURRENT_USER\Software, you would have to export the entire HKEY_CURRENT_USER\Software key This would undo any changes other programs make to their registry keys in between the time you back up and restore that key.
Do these 3220 keys have Subkeys under them? And do the Subkeys have Subkeys?
You'd have to have a list of the 3220 keys to read, read in each item from the list, Recursively query the registry for that key to get all of it's subkeys and the subkey's subkeys, then query again to get the Value names, Value types, and value data for each key/subkey found, then build a batch file to add those values back in using Reg Add.
If none of the 3220 keys have any subkeys, you can skip the recursive query, and just query for the values
Once that is done, you can merge a precreated .reg file with the values you want.
To restore, you would merge a precreated .reg file to remove your values, then run the batch file you created to put back the values you backed up.
Microsoft MVP - Windows Expert - Consumer
Of course I know all the answers; I just don't always match the answers to the right questions.
Rated R for Violence -- When your PC flies through a window, that's violent, right?