Over the years, I’ve written many articles that discuss making modifications to the Windows system registry. As I write these articles, I always warn readers that editing the registry can be dangerous and that they should make a full system backup before continuing.
It’s always a good idea to make a full system backup before tampering with the registry, but sometimes doing so is impossible or impractical. After all, do you really want to spend the time or the resources to back up a test workstation that has 15 GB of junk on the hard disk? But by following these steps, you can back up the Windows registry without having to back up the entire hard drive.
This article suggests ways to edit your system registry. Using the Windows Registry Editor incorrectly can cause serious problems that could require you to reinstall your operating system or cause data loss. TechRepublic does not and will not support problems that arise from your editing the registry. Use the Registry Editor and the following directions at your own risk.
Also, let me say that the methods demonstrated here are no substitutes for a full system backup. I recommend always performing a full system backup before making registry changes. This method is to be used only in situations in which a full system backup is impossible or impractical.
Backing up specific registry keys
Let me begin by showing you one of my favorite registry editing tricks. When researching a registry edit for a TechRepublic article, I don’t always know what effect the change will have. This uncertainty can be dangerous because not all registry keys are created equally. Some keys have the potential to make your Windows installation unbootable, while others are relatively harmless.
When working with one of the more harmless registry keys, I’ll often back up just that key. Doing this saves me from having to write down the original value and also reduces the chances that I’ll make a mistake.
To back up an individual registry key or a specific registry section, open the Registry Editor and navigate to the location of the registry that you intend to modify. Select the key that contains the value or values you intend to modify. Finally, select the Export Registry File command from the Registry Editor’s Registry menu. The name of the command and its location differs among the versions of Windows. For example, in Windows 2000, the command is Export Registry File and the command exists on the Registry menu. However, in Windows XP, the command has been abbreviated to Export and is on the Registry Editor’s File menu. So you may have to do a bit of hunting for the command depending on what version of Windows you’re using.
|You can quickly back up the entire Windows registry, a single key, or a series of keys using the Registry Editor’s export function. Just remember to give your backup file a descriptive name so you can identify it later.|
Once you have selected the Export command, the Export Registry File dialog box shown in Figure A will appear. Enter a filename that reflects the nature of the key you’re backing up and select the correct path. Check the Export Range options, located at the bottom of the dialog box. These options allow you to back up either the entire registry or just a specific part of the registry. Since in this instance you only want to back up a portion of the registry, the Selected Branch option should be selected. You’ll also want to verify that the correct registry entry is located in the text box beneath the Selected Branch option. Click Save and that’s all there is to it. The registry key you specified and all its subkeys have been backed up.
If you need to restore the registry keys, simply open the Registry Editor, and use the Import Registry File function. As I mentioned, the exact name and location of this command will differ depending on which version of Windows you have. However, it should be located with the Export Registry File command.
Backing up the entire registry
The technique you use to back up the entire registry varies depending on which version of Windows you’re using. If you’re using Windows 98 or Windows Me, you need only enter the SCANREGW command at the Run prompt. The SCANREGW prompt will appear, and it will ask if you want to back up the registry. Just click Yes.
When you back up the registry using this method, Windows will create a file called RBOX.CAB, where X is a number ranging from 1 to 5.You can make up to five different backups. When you make the sixth backup, the oldest backup file will be overwritten. The backup files are placed into the \Windows\SYSBCKUP folder.
Each backup file is actually a CAB file that contains several critical files. These files include USER.DAT, SYSTEM.DAT, SYSTEM.INI, and WIN.INI. If you need to restore the registry, simply use the EXTRACT file contained on your Windows installation CD to extract the various files from the CAB file, and then use these files to replace the originals. It’s very important that you replace all of the files, not just one, because the files are partially dependent on each other and need to stay in sync.
A Windows 2000 or Windows XP registry backup is a little bit different. Rather than using a utility to create a CAB file, you must use the BACKUP program located on the System Tools menu. Although there’s no explicit option for backing up the registry, there is an option for backing up the system state. The system state includes the registry and the other critical files that must be backed up alongside of it.