View Full Version : Back up a single Win registry key
rVidia
07-29-2006, 09:16 PM
Note: Do not back up the entire registry or a registry hive (attachment "NO") using this technique.
Before making any changes to the registry, you may want to make a restore point (https://www.microsoft.com/windowsxp/using/setup/learnmore/tips/kimsey1.mspx). Making a restore point will only take a "snapshot" of / monitor changes to the registry and important system files, not personal data files (a common misconception).
Making a change to the registry can be useful, although if something goes wrong, it may damage your system; therefore, making a backup of an individual registry key before modifying it is recommended:
98/ME/XP
In the Registry Editor (go to Start > Run > type regedit > click OK),
1. Locate the value you are going to modify
2. You need to back up the parent key (in the left pane, select/click on the folder that the value in step 1 is in)
3. Go to File > Export
4. In the new window, navigate to a location on your computer where you want to store the backup
5. Name the backup
6. Click Save
Now you can modify the value.
If you encounter any problems, you can do a restore:
1. In the Registry Editor, go to File > Import
2. Find the .reg file backup you are going to restore
3. Click Open
4. Click Yes if prompted to import the .reg file
You could also double-click on the .reg file you need to restore.
After, the .reg file contents will be merged into the registry.
Guest117
07-31-2006, 08:25 AM
Why not just run scanregw and backup the whole reg easily.
I use cabrest.bat to store 15 reg backups. On a good day I may backup 2-3 times just to have something good to fall back on. Saved my rump many times.:cool:
rVidia
08-01-2006, 11:49 AM
Why not just run scanregw and backup the whole reg easily
Nick:
If you are making several modifications to the registry, it may, in fact, be easier to back up the whole registry; however, if you make these several modifications and suspect only one or two are causing problems, backing up individual reg keys can make things easier as well, in terms of not having to modify all other keys for a second time after restore. This method can also be useful in identifying what caused the problem. It is still, of course, important to make backups of the whole registry :wink:
On a good day I may backup 2-3 times just to have something good to fall back on.
You're a smart fellow, aren't you? :cool:
dbarrow
08-01-2006, 01:51 PM
When removing keys....
Remember that JV16 makes automatic backups of changes and can easily put them back.
You can do a lot of registry management with the Registry Manager module of JV16.
photolady
08-03-2006, 09:27 AM
Nice tip for amateur's but I've been doing this one for years. Most of the time I do a full backup of the registry saved to disk. But sometimes I do just one. Usually the one I'm modifying in case of an oops.
dbarrow
08-03-2006, 10:21 AM
And I forgot to mention...
Did you know there are 2 registry backups maintained within XP?
Open \Windows\Repair folder and note the files within.
Sam,Security,Software and System are your reg hives.
The ACTIVE registry is located in \Windows\System32\Config folder where you will find the same files.
Every X number of reboots or X days, XP makes a backup of the active files to Repair. I have never been able to track down the specifics of this timer but it is a built-in function.
System Restore
The System Restore system also maintains a backup copy of the registry hives which is what is used any time you create or use a Restore Point.
Other than when you manually create a Restore Point, I have not been able to determine what the refresh frequency is for System Restore.
XP has several built-in methods of self-healing or repair when it comes to a damaged registry, a subject I have not devoted further research to.
Upon detecting a registry problem, XP will (and I am not sure of specific triggers) load one of the backup registry hives (and I am not sure where it pulls it from)
This can cause all kinds of PROBLEMS as in the reg keys and drivers that refuse to go away when changing or uninstalling them.
I'm sure we have all experienced one of those issues where you change or uninstall a driver and, despite reg purging with JV16 or manual delete of keys, it suddenly re-appears and just won't go away. That is because Mother Windows, with infinite wisdom, has decided to reload the registry from one of those backups.
*Note: I once chased this around for days on one machine where I swear it was loading a backup copy of the registry every time I booted it. Never did figure this one out!
There is another mysterious quirk to XP I will call the "stale registry syndrome" where you make changes or run an install and upon reboot, those changes are gone.
It appears that XP decided to load one of the older backup versions of the registry.
This can appear out of the blue with a balky MSI installer, one of those program installs where it seems to hang longer than it should, and the install went in but isn't working. It may be triggered by a faulty MSI installer for the program. It could also stem from a bad "write on exit" to the active registry from a hardware or software hang in the shutdown process. In any case, it appears XP is loading an older copy of the registry on reboot and replacing any changes that were made.
Understanding all this will require dedicated study of one of those very deep books on the XP registry..... a task I have not felt like taking time for.
The good news is...
Restore Points do work and if you bother to manually create a Restore Point before mucking around with something, chances are you can undo any adverse effects.
Providing, that is, XP boots to a point in the startup menu where you can choose a Restore Point.
Repair Folder is an option...
Sooner or later, we are all confronted with the NO BOOT BSOD with the error message that HAL or CONFIG is missing or corrupt, ie: blown reg hive.
The EASY way out of this one is replacing it with one from the Repair Folder.
Boot from the XP install CD and choose the first "r" option to load the Repair Console.
Find your XP install and select.
Logon with your Admin password.
Once in the Repair Console, you should be at a DOS :> prompt.
Navigate to \Windows\Repair
cd \repair
dir (see contents of folder)
copy system (drive):\Windows\System32\Config
replace y
You can usually get away with replacing system only. If in doubt, copy all four files.
Exit Repair Console and reboot. XP should load up without problems. Note that you will lose any recent changes that were made. If you had created a Restore Point prior to those changes, now do a System Restore to the one you created to get back to square one.
This can be far faster and easier to accomplish than restoring a backup image where XP resides on a large drive or partition with other programs and restoring the image may take an hour or more!
Once you have done it and get the hang of it, this is a five minute solution to the all day problem.
Protected keys
Also note, when doing registry backups manually, despite the fact that you have exported and saved a change, there are certain portions of the hives XP protects like a nasty mother goose and won't let you tinker with. Attempting to restore these keys from a backup will be blocked. Regedit and Regedit32 will not let you add or modify those protected keys from a backup.
This is one reason why a complete registry backup or even a full hive backup CAN NOT be re-imported or added to current active registry. The importation or install will stall on the first protected key it hits and you can go no further!
I would have to dig up my list of the protected sections as I did once figure them out when mashing registry keys for cloning.
There are ways ... a task I have not performed in some time, to export many keys, ie: software section and use that export to bring back installed programs from an image file and make them work.
IE: All your installed programs reside on a Programs X: partition. Make an image of X:\Programs
On your (new) box, create a corresponding and equal size X:\Programs partition.
Restore X:\Programs from your image file to the new machine.
Now, you have a new machine where all your programs are visible on X:\Programs but won't work because there is no information in the registry to tell the OS where to find them.
On the old machine, EXPORT all the software keys (I would have to go look to tell you what exports and imports and what protected key sections not to export)
Transfer those .reg files to the new machine.
IMPORT them to the active registry by double clicking them.
The software on X:\Programs will now work correctly as you have added the necessary keys.
This is a rather detailed process but I have done it many times cloning my master XP build from one machine to another.
In fact, this machine I am on is a fourth generation clone.
Once you figure out the process, it boils down to about a 1 hour job which can be far faster than re-installing all your programs (and hunting down your original installers for them)
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.