Taking Precautions Before Editing Registry Data

[Previous] [Next]

In addition to being of sound mind and body, wide awake and sober, armed with accurate information, and not distracted by small children, it's smart to print or save the registry section you're about to change, before you change it. If your edits don't have the desired effect, you can then use the printout or saved file to return the registry to its former state—assuming, of course, that your changes aren't so disastrous that they keep your system from functioning at all. (If they do, restart your computer and invoke the last known good configuration. See the sidebar "Recovering from a Damaged Registry.")

Saving Registry Data

You can save a portion of the registry using Registry Editor, as follows:

  1. Select a key.
  2. Open the Registry menu and choose Save Key.
  3. Registry Editor creates a binary (not human-readable) file with (by default) no extension, encompassing the selected key and all its subkeys.

If you need to return the registry to its unedited state:

  1. Select the key from which the file was saved.
  2. Open the Registry menu and choose Restore.
  3. Select the saved file in the Restore Key dialog box, and click Open.
  4. You will be warned that the file will overwrite and replace the contents of the currently selected key.

  5. Make sure you've selected the matching key, and then click OK.

NOTE
A section of the registry saved as a file is sometimes called a hive.

Be aware that if you restore a saved registry hive to the wrong part of your registry, you will almost certainly wreak havoc upon your system. A safer way to save a portion of your registry is to use Regedit.exe. With Regedit, you can back up a portion of your registry as follows:

  1. Select a key.
  2. Open the Registry Editor and choose Export Registry File.
  3. Give your export a filename with the .reg extension.
  4. To restore the saved registry file, simply double-click it in Windows Explorer. The file contains information about the key from which it was saved and will automatically be restored to the appropriate key. Using this method you cannot inadvertently restore registry data to the wrong part of your registry.

Printing Registry Data

To print a section of the registry, select a key, open the Registry menu, and then choose Print Subtree. Registry Editor generates a printout in Courier New font with page numbers but no other adornments. Although the command is Print Subtree, and although Registry Editor generally uses the term subtree to denote an entire predefined key, the printout encompasses only the current key and its subkeys.

As a further precaution, it's a good idea to turn on Confirm On Delete before you begin editing. With Confirm On Delete on, removing a key generates a confirmation prompt. If you accidentally select the wrong registry key and hit Delete, this feature can save you from a serious mishap. Any time you plan to remove a registry key, it's a good idea to let Registry Editor serve up this confirmation prompt. Then check one more time before sending that unwanted key on its way. Remember, any changes you make in Registry Editor are effective immediately.

Confirm On Delete is a toggle on the Options menu. If a check mark appears beside the command, the feature is on; choose the command a second time to turn it off.

(Another command on the Options menu, Auto Refresh, does not provide additional safety. With Auto Refresh on, registry changes made by local applications while Registry Editor is running are updated immediately in Registry Editor's display.)



Running Microsoft Windows 2000 Professional
Running Microsoft Windows 2000 Professional
ISBN: 1572318384
EAN: 2147483647
Year: 2000
Pages: 317

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