Keeping the Registry Safe


The sheer wealth of data stored in one place makes the Registry convenient, but it also makes it very precious. If your Registry went missing somehow, or if it got corrupted, Windows XP simply would not work. With that scary thought in mind, let's take a moment to run through several protective measures. The techniques in this section should ensure that Windows XP never goes down for the count because you made a mistake while editing the Registry.

Backing Up the Registry

Windows XP maintains what is known as the system state: the crucial system files that Windows XP requires to operate properly. Included in the system state are the files used during system startup, the Windows XP protected system files, and, naturally, the Registry files. The Backup utility has a feature that enables you to easily back up the current system state, so it's probably the most straightforward way to create a backup copy of the Registry should anything go wrong. Here are the steps to follow to back up the system state:

1.

Select Start, All Programs, Accessories, System Tools, Backup. (Note that if you're using Windows XP Home, you might need to install Backup from the Windows XP CD.)

2.

If the Backup or Restore Wizard appears, click the Advanced Mode link.

3.

Display the Backup tab.

4.

In the folder tree, open the Desktop branch and then the My Computer branch, if they're not open already.

5.

Activate the System State check box.

6.

Choose your other backup options, click Start Backup, and then follow the usual backup procedure.

Leave Room for the System State

Depending on the configuration of your computer, the system state can be quite largeup to 350MB. Therefore, make sure the destination you choose for the backup has enough free space to handle such a large file.


Saving the Current Registry State with System Restore

Another easy way to save the current Registry configuration is to use Windows XP's System Restore utility. This program takes a snapshot of your system's current state, including the Registry. Then, if anything should go wrong with your system, the program enables you to restore a previous configuration. It's a good idea to set a system restore point before doing any work on the Registry:

1.

Select Start, All Programs, Accessories, System Tools, System Restore. The System Restore window appears.

2.

Activate the Create a Restore Point option and click Next.

3.

Use the Restore Point Description text box to enter a description for the new checkpoint, and then click Create. System Restore creates the restore point and displays the Restore Point Created window.

4.

Click Close.

Protecting Keys by Exporting Them to Disk

If you're just making a small change to the Registry, backing up all of its files may seem like overkill. Another approach is to back up only the part of the Registry that you're working on. For example, if you're about to make changes within the HKEY_CURRENT_USER key, you could back up just that key, or even a subkey within HKCU. You do that by exporting the key's data to a hive file, which is a binary file (meaning you can't edit it). That way, if the change causes a problem, you can import the hive file back into the Registry to restore things the way they were.

Exporting a Key to a Hive File

Here are the steps to follow to export a key to a hive file:

1.

Open the Registry Editor and highlight the key you want to export.

2.

Select File, Export to display the Export Registry File dialog box.

3.

Select a location for the file.

4.

Use the File Name text box to enter a name for the file.

5.

In the Save as Type list, select Registry Hive Files.

6.

If you want to export only the currently highlighted key, make sure the Selected Branch option is activated. If you'd prefer to export the entire Registry, activate the All option.

7.

Click Save.

Importing a Hive File

If you need to restore the key that you backed up to a hive file, follow these steps:

1.

Open the Registry Editor.

2.

Select File, Import to display the Import Registry File dialog box.

3.

In the Files of Type list, select Registry Hive Files.

4.

Find and highlight the file you want to import.

5.

Click Open. The Registry Editor asks you to confirm.

6.

Click Yes.

7.

When Windows XP tells you that the information has been entered into the Registry, click OK.



Tricks of the Microsoft Office Gurus
Tricks of the Microsoft Office Gurus
ISBN: 0789733692
EAN: 2147483647
Year: 2003
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net