Backing up Your Registry

View previous topic View next topic Go down

Backing up Your Registry

Post by Doctor Inferno on 16th April 2008, 1:27 pm

Nobody wants to do it, some people refuse to. However, at some point, you will need to edit the registry. The registry is a wonderful and terrible place, at the same time. You can access many hidden settings, and tweaks that were not previously possible. Other times, you have a problem with Windows, that only a registry edit can fix. The problem with the Windows registry editor (here on out referred to as regedit) is that it does not give anyone any chances to undo an action. What this means is, your changes are a one way street. Therefore, it becomes critical that you back up your registry before attempting tweaking or repair.

Here is how.

In Windows XP:
Method 1

Click Start, All Programs, Accessories, System Tools, System Restore. From here, we will click the Next button, and then Click Create on the next page. Give it a memorable name. Restoring the registry is easy as well. Going back to System Restore, instead go to Restore My Computer to an Earlier Time, and choose the restore point you previously created.


Method 2
Backup files under C:\windows\system32\config folder. The pertinent files are SYSTEM, SOFTWARE, SAM, SECURITY, and DEFAULT. Make sure you save them in a folder at the root of the C:\ drive, and not under ~\Windows or Profile folders. The method of replacement in this method is more complex, but essential when your system isn't booting from your mistake in the registry. In this case, you would review this article http://support.microsoft.com/kb/307545. The only difference is, under Part 1, step 5, the last set of copy commands will differ. Lets pretend that you backed up the 5 files to C:\regbackup. Instead, the last part of step 5 will look something like this:
copy c:\regbackup\system c:\windows\system32\config\system
copy c:\regbackup\software c:\windows\system32\config\software
copy c:\regbackup\sam c:\windows\system32\config\sam
copy c:\regbackup\security c:\windows\system32\config\security
copy c:\regbackup\default c:\windows\system32\config\default

It also invalidates Part 2 and Part 3. So in that respect, its easier than the article. Not to mention, it now makes the process work perfectly fine for OEM versions of Windows! Part 4 will still work, and should be done, if the registry backup is new.


Method 3
Instead of an entire registry backup, which may be extreme under some circumstances to fallback on, we can do a simple single key backup. In these cases, we would backup the key we are editing. For example, if I was editing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, I could backup this key. This assumes you have opened regedit.exe and are looking at your registry, by the way. First, we make sure that the correct key is highlighted, on the left. Then, go to the menu File, and choose export. Make sure that at the bottom, the correct key is noted, and selected on selected branch. Then we save it with a memorable filename somewhere safe. Restoring a backed up key is easy, just double click to import the information back into the registry.




In Windows Vista:
Method 1

Click the Start Orb, and type systempropertiesprotection into the search box. Go through the UAC prompts, if they are enabled on your system. It will present you with the Advanced System Properties box, and have the System Protection tab highlighted. Simply choose the drive that needs a restore point created for, and click Create. Give it a name that you will remember.
Restoring it is easy. Go back to the same place, and this time click system restore. You can chose the recommended restore, but chances are, you need to click the box that says Choose a Different Restore Point, and click Next to chose your backed up point.


Method 2
This method is the same as XP's method 3, mainly because there is no reason to backup the 5 hive files in Vista, as we can access System Restore from the Windows Recovery Environment to restore from Method 1. You boot off the DVD, go through the prompts, and instead of choosing Install Now, you choose the Repair option. So, the other preferred way to backup your registry will be the same as Method 3 for XP. In case people don't want to scroll up:
Instead of an entire registry backup, which may be extreme under some circumstances to fallback on, we can do a simple single key backup. In these cases, we would backup the key we are editing. For example, if I was editing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, I could backup this key. This assumes you have opened regedit.exe and are looking at your registry, by the way. First, we make sure that the correct key is highlighted, on the left. Then, go to the menu File, and choose export. Make sure that at the bottom, the correct key is noted, and selected on selected branch. Then we save it with a memorable filename somewhere safe. Restoring a backed up key is easy, just double click to import the information back into the registry.

I have received question as to why I did not include a popular method of backing up the registry. This method is where you open regedit.exe, highlight the topmost entry (Computer), and then go to file, Export, saving an entire backup to a .reg file. Another way, but to the same end is to do it via command line:
regedit /e C:\whatever.reg

The reason I did not mention this, is quite simply because it does not work. At all. Sure, you get a backup, but to what end? If you try to re-merge the backup, you are rudely greeted with an error a few seconds later.


Please be a GeekPolice fan on Facebook!



Have we helped you? Help us! | Doctor by day, ninja by night.

Doctor Inferno
Administrator
Administrator

Posts Posts : 12015
Joined Joined : 2007-12-26
Gender Gender : Male
OS OS : Windows 7 Home Premium and Ultimate X64
Protection Protection : Kaspersky PURE and Malwarebytes' Anti-Malware
Points Points : 104610
# Likes # Likes : 0

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum