CIS 170F: Windows 7 Administration

Week 10

Application Support
Windows 7 Registry
Registry Backup and Restore Methods

Both REGEDIT.EXE and REG.EXE can export the current settings from part of the registry database to a text-based file. This file has a .REG extension.

The registry database can be preserved in multiple ways. Both the graphical registry editor and the command-line registry editor have the option of exporting the current settings from part of the registry database to a text-based file. The file has a .REG extension to signify that it is a registry file. If there are multiple registry areas that need to be exported, then each one must be individually exported to a separate .REG file.

If you want to back up many parts of the registry before making changes, the export method may be too selective. A method that backs up the whole registry may be preferred. This can be accomplished by performing a complete PC backup. The registry is a live database that is active in memory, therefore a backup method must be used that includes not only the file information but also the system state of the operating system. The system state includes dynamic settings that define individual operating system components and how they interact.

A user may import a .REG file if the user has permission to update the portion of the registry that will be modified. When the user double-clicks on the .REG file, they are prompted to confirm the action. If they respond affirmatively, the data will be imported as permissions allow

Backing Up the Registry

You can back up the Registry several ways. In order of preference, these are using a third-party Registry-backup program, backing up the entire hard disk using a third-party program or Complete PC Backup, using System Restore, and using the Registry Editor to save a key to a text file.

  • Backing Up with Third-Party Registry-Backup Software
  • There are third-party programs specifically designed to back up and restore the Registry. For example, SuperWin's WinRescue program (www.superwin.com) not only can back up and restore the Registry, but also can defragment the Registry's files and work magic to revive a nonbootable Windows system. There is also a free tool called ERUNT, which you can download from http://www.larshederer.homepage.t-online.de/erunt.

  • Backing Up the Hard Disk
  • You can save the Registry by performing a backup of the entire contents of the hard disk on which Windows resides. On the Windows 7 Home versions, you'll have to use a third-party disk backup program to back up the entire hard disk. On Windows 7 Professional, Enterprise, and Ultimate editions, the Complete PC Backup program can do this for you, or you can use a thirdparty program.

  • Backing Up with System Restore
  • If you will be changing only entries under HKEY_LOCAL_MACHINE, you can create a restore point to back up a copy of this part of the Registry. To create a restore point, follow these steps:

    1. Click Start. Right-click Computer and select Properties. Then, at the left, select System Protection. (Alternatively, type sysdm.cpl in a Command Prompt window, and then select the System Protection tab.)
    2. Be sure that the disk volume that contains Windows is checked, and click Create.
    3. Enter a description for the restore point, such as Before changing Registry, and then click Create.

  • Backing Up with the Registry Editor
  • The Registry Editor has a mechanism to export a set of Registry keys and values to a text file. To back up a key and its subkeys and values, follow these steps:

    1. To run Regedit, click Start, and type regedit in the Search box.
    2. When Regedit appears under Programs in the search results, select it and press Enter. (Alternatively, type regedit in a Command Prompt window.)
    3. Locate and select the key you plan to modify, or a key containing all the keys you plan to modify, in the left pane.
    4. Select File, Export.
    5. Choose a location and filename to use to store the Registry keys.
    6. Select All Files from the Save As Type list, and enter a name (possibly with an extension other than .reg-for example, before.sav).
    7. Click Save. The chosen key or keys are then saved as a text file.

Activity 11-7

Restoring the Registry

If you made a Registry backup using a third-party disk or Registry backup tool, use the instructions that came with your product to restore the Registry.

  • Restoring the Registry from a Restore Point
  • If you created a restore point before modifying the Registry, you can back out the change by following these steps:

  • Click Start. Right-click Computer and select Properties. At the left, select System Protection. Then, click the System Restore button. (Alternatively, type rstrui in a Command Prompt window.)
  • Locate the restore point you created. Select it and click Next; then click Finish. Windows will restart.
  • Restoring the Registry from Regedit
  • If you need to restore the Registry from a key you saved from within Regedit, follow these steps:

    1. In Regedit, select File, Import.
    2. Select All Files from the Files of Type list.
    3. Locate the file you used to back up the Registry key or keys-for example, before.reg.
    4. Select Open.

Activity 11-8

Signs of Registry Problems

Registry corruption can take two forms: Either the Registry's database files can be damaged by an errant disk operation, or information can be mangled by a buggy program or an overzealous regedit user. No matter what the cause, the result can be a system that won't run or one that reboots itself over and over. These could be other signs of Registry corruption or errors:
  • Drivers aren't loaded, or they give errors while Windows is booting.
  • Software complains about components that aren't registered or cannot be located.
  • Undesirable programs attempt to run when you log in.
  • Windows does not boot, or it starts up only in Safe mode.