SPECIAL COMMUNICATION AND INFORMATION SECURITY STATE SERVICE

COMPUTER EMERGENCY
RESPONSE CENTER

Report Incident

Articles > Troubleshooting the Windows Registry

2 Apr 2011

Introduction
The Windows registry is nothing more than a database of the hardware and software installed on your computer. Your operating system uses instructions stored in the registry to determine how installed software and hardware should function. Normally, software you purchase will include a standard Windows installer that writes to the registry during installation. If you’re asked to restart your computer after installing software, you can be reasonably sure the registry has been modified.
Some software does not include the standard installer, or uses no installer at all. Software that does not require an installer can usually be run from any location on your computer. The registry also prevents you from copying installed software from one computer to another. It “binds” software to your computer and your computer only.

Diagnosis: When things go wrong
Normally, a casual computer user never has to locate, view, or edit the registry; but sometimes hardware conflicts and improperly installed software make these tasks a necessity. Symptoms pointing to a registry problem include

  • consistent error dialog boxes that refer to missing Dynamic Linked Libraries (DLLs)
  • missing Virtual device driver (VxD) files
  • new or partially installed drivers conflicting with vestiges of old drivers
  • extremely slow boot and/or shut-down processes
  • slow performance after the computer has completed the boot process
  • system “freezes”
  • trouble installing or removing applications

If you encounter any of these symptoms, you should first try to uninstall the application reporting the errors. Often, this process will remove the DLLs and registry entries that are giving you problems. If you have already tried this strategy, however, and you suspect you may have a registry problem, you should next try to reboot your computer into Safe Mode.
To boot your computer into Safe Mode in Vista or Windows XP, press the F8 key before or just as the Windows splash screen appears. A boot menu will appear. You can select either Safe

Mode or Safe Mode with Networking. Other versions of Windows have similar Safe Mode procedures. Consult your user manual for full details about these procedures.

How to fix registry problems
The easiest way to fix registry problems is to use either a free or commercially available registry cleaner. Before you download and install these applications, you should back up your registry in case anything unexpected happens in the process. This will allow you to return your computer to the state it was in before the repair process. It is also a good idea to periodically back up your registry, even when your computer is running smoothly. Below are backup and restoration instructions for three Windows systems. If you use another version of Windows, the procedures are similar.
Follow these steps to back up and restore the registry for Windows 2000 or Windows XP.
Backing up the registry

  1. Click Start, click Run, type %SystemRoot%\system32\restore\rstrui.exe and then click OK.
  2. On the Welcome to System Restore page, click “Create a restore point” and then click Next.
  3. On the Create a Restore Point page, type a name for the restore point and then click Create.
  4. After the restore point has been created, click Close.

Restoring the registry

  1. Click Start, click Run, type %SystemRoot%\System32\Restore\Rstrui.exe and then click OK.
  2. On the Welcome to System Restore page, click Restore my computer to an earlier time (if it is not already selected), and then click Next.
  3. On the Select a Restore Point page, click the system checkpoint. In the On this list select the restore point area, click an entry that is named "Guided Help (Registry Backup)," and then click Next. If a System Restore message appears that lists configuration changes that System Restore will make, click OK.
  4. On the Confirm Restore Point Selection page, click Next. System Restore restores the previous Windows XP configuration and then restarts the computer.


5. Log on to the computer. When the System Restore confirmation page appears, click OK.
You can use the following backup and restore processes in Windows Vista
Backing up the registry

  1. Click Start
  2. Select Run from the Menu
  3. When the Run Dialog Box appears type regedit (The windows registry editor will now appear.)
  4. Click the File menu option and from its menu, select Export
  5. Select the All option in the Export Registry File dialog
  6. Type a name for the file you wish to export
  7. Click Save.

Restoring the registry
To restore the registry to its saved state in the event of a system failure, click File and select Import from the drop-down menu.

Using a commercially available registry cleaner
The author identifies two programs below that will allow you to safely scan for, clean, and repair a variety of registry problems. While they are capable of solving many registry problems, there are many others available that are equally suited for this task. Thus, we do not recommend one software application over another; rather, we describe these two in order to give you an idea of what to expect from a typical registry cleaning program.
Registry Mechanic (http://www.pctools.com/registry-mechanic/) is a fairly complete, user-friendly registry cleaner that allows you to diagnose and fix problems with a few mouse clicks. This program uses its own backup process before the scan begins so you can return to the computer’s initial state in case anything goes wrong. When you click Start Scan, the program will begin to look for unused or broken registry entries. This process may take a few moments. When bad entries are found, you may then choose to repair or delete them individually or allow the program to repair everything automatically. If you are an experienced user, you may wish to look at the list at a granular level to make sure the deletion process has minimal impact on the programs you regularly use. If you are a novice, allow the program to automatically repair registry problems.

CCleaner (http://www.ccleaner.com/) is a free PC optimization utility that not only cleans the registry but also manages Windows components (file cache, recycle bin, temporary files, and more). It also features its own Uninstaller menu, thereby allowing you to maintain your collection of software, too. CCleaner can be set to run on startup or manually. You can either click Analyze, to see what will be removed before deleting any files, or Run Cleaner, which will analyze and clean all in one process.

How to prevent registry problems
You can avoid registry problems by following a few basic guidelines. The following is not a complete list of preventive measures, but will help you avoid a majority of registry-related problems.

  • Shut down your Windows PC with the standard [start] -> shut down procedure. Interrupting this procedure by a “forced shutdown” may corrupt the registry because Windows frequently writes to the registry at this time. A forced shutdown may result in the addition of a partially written file to the registry. The next time you turn on your computer, you may see signs of corruption. Laptop/notebook users should take heed when the battery is low and shut down immediately. The shutdown procedure often requires a lot of hard disk access and, therefore, power. Some laptops immediately cut power in the event of extremely low battery power.
  • Uninstall unwanted software or hardware with the vendor’s uninstall program. If an uninstaller did not come with your software, you may also use the standard Windows uninstaller, which is located in System -> Add/Remove Programs. Make sure you allow the Windows uninstaller to complete.
  • Do not interrupt software installation procedures or upgrade procedures by forcing the system to shut down. On rare occasions when the system hangs or freezes it is necessary to hold down the power button until the system completely shuts down. However, performing a forced-shutdown after normal operation is not recommended, and doing so during an installation or upgrade is asking for trouble.
  • Do not install drivers on top of drivers. If you are installing new drivers for a particular piece of hardware (a video card, for example), make sure to use an approved driver upgrade from the vendor. For example, installing non-standard monitor drivers alongside existing video card drivers from another vendor might cause problems.
  • If you absolutely must manually install software from another vendor to work in conjunction with existing hardware, ensure that you completely remove the old drivers before installing anything new. For example, if you would like to update drivers to support your new widescreen monitor, it is a good idea to remove the current driver (thereby setting the driver to “unknown monitor”) before installing the new ones.
  • Back up your registry occasionally, even during normal operating conditions, by using the methods described in the “How to fix registry problems” section.


If you frequently install and uninstall programs to try them out, it is a good idea to purchase a registry cleaning application and run it on a regular basis. If you are the organized type who regularly makes to-do lists for computer maintenance, you can put this task on the same schedule as the defragmentation process or a routine spyware check, for example. You may even notice that regular registry cleaning nets a significant increase in the speed and responsiveness of your computer.

Copyright © 2010 Carnegie Mellon University.