Tuesday, May 15, 2007

How to backup the Windows XP Registry?

Introduction

Registry Editor is an advanced tool for viewing and changing settings in your system registry, which contains information about how your computer runs. Almost the entire settings are stored in the registry. For example, when you resize an application window, the window position (x,y points) is stored in the registry so that the settings are retained permanently. This is just an example, there are much more data stored in the registry, right from your user account names and passwords (if configured to store in the registry).

Although Registry Editor enables you to inspect and modify the registry, it's advisable to use Registry Editor only if the GUI does not provide the option you're looking for. Making incorrect changes in the registry can break your system. It's highly advisable to backup the registry before editing any portion of it.

Backing up the XP Registry - Three methods

Method 1: Using System Restore

One way to backup the registry is to create a System Restore snapshot. System Restore returns your computer to a previous snapshot without losing recent personal information, such as documents, history lists, favorites, or e-mail. It monitors the computer and many applications for changes and creates restore points. You restore these snapshots when your configuration isn't working. This method is unreliable in case you want to rollback the registry changes made a longtime ago, in which case the System Restore might have purged that particular restore point - due to space constraints or due to a recent system restore point or even a Restore point corruption. Please remember, System Restore points get deleted for many reasons, making it unreliable, especially in the long run.

Method 2: Backing up the selected branch of the registry by exporting (Reliable)

This method is preferred if you're making changes to a specific key/area of the registry. To backup a selected branch/key in the registry, try this:

  • Click Start, and then click Run.
  • In the Open box, type regedit, and then click OK
  • Locate and then click the key that contains the value that you want to edit
  • On the File menu, click Export.
  • In the Save in box, select a location where you want to save the Registration Entries (.reg)
  • In the File name box, type a file name, and then click Save.

REGISTRY1.JPG (37886 bytes) REGISTRY2.JPG (41671 bytes)
(Backing up a selected branch/key of the registry)

Now that you've created a Registry backup for that particular key. Save the REG file in a safer location in case you want to undo the registry changes made. You can restore the settings by just double-clicking the REG file. It automatically merges the contents to the Registry.

Method 2 (a) : Export registry keys using a command-line (Console Registry Tool)

You can use the Console Registry Tool for Windows (Reg.exe) to edit the registry. For help with the Reg.exe tool, type reg /? at the Command Prompt, and then click OK.

Example: To export the key [HKEY_CURRENT_USER\Software\IOLO] and it's sub-keys, try this from Command Prompt:

REG EXPORT HKCU\Software\IOLO C:\IOLO.REG

To view the REG contents type notepad C:\iolo.reg in Start, Run dialog. Console Registry Tool is extremely handy for network admins and also for home users.

Method 3: Backing up the whole registry ("System state")

For backing up the whole registry, use the NTBackup utility to back up the System State. The System State includes the registry, the COM+ Class Registration Database, and your boot files. See section "Back Up the Whole Registry" in the following article: