WindowsDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


AddThis Social Bookmark Button

How To Recover from Registry Corruption

by Mitch Tulloch
06/27/2006

One of the most frustrating experiences working with computers is when they won't start. This frustration is usually compounded by cryptic error messages that don't provide you with enough information to determine what's wrong, let alone fix the problem. For example, maybe you've seen the following message when starting your Windows XP machine:


Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SOFTWARE

Or maybe this one:


Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM

An advanced user might recognize that the files the messages refer to are registry hives, binary files that contain the Windows registry. The first one is the Software hive, which contains the HKLM\SOFTWARE portion of the registry tree, while the second one is the System hive, which maps to HKLM\SYSTEM. The messages indicate that a portion of your registry has somehow been lost or corrupted, and as a result, Windows can't start.

The simplest way to resolve this situation is to restore your system state data from a recent backup. The system state data for your computer consists of the registry hive files, boot files, and the COM+ Class Registration database. Using the Backup utility included with Windows XP, you can easily back up your system state or restore it (Figure 1):

Thumbnail, click for full-size image.
Figure 1: Backing up your system state data, including the registry (click for full-size image).

Tip: If you run Windows Backup and the System State item is missing, you're probably logged on as an ordinary user, not an administrator. To back up the system state data on your machine, you must be logged on as a local administrator. Or, you can open a command prompt and type runas /user:administrator ntbackup to start Backup using Administrator credentials on your machine.

Alternatively, if you know you created a recent backup but can't find it, you're in luck: when Backup is used to back up your system state, it also copies your existing registry hive files to the %SystemRoot%\Repair folder. This means you can restore your corrupted or missing registry hives by logging on with the Recovery Console and copying the files from %SystemRoot%\Repair to %SystemRoot%\System32\config.

But what if you have never backed up your system state using the Windows Backup utility? You might still be able to recover your system by following the approach described below. Two caveats, though: some of the steps in this approach are not supported, so if your machine still won't start afterward, you can't blame Microsoft (or me). And, if your computer came with Windows XP pre-installed by an Original Equipment Manufacturer (OEM), the procedure below may fail due to OEM changes to the system hive on your machine. (In any case, you should really blame yourself for not making a recent backup.)

Pages: 1, 2

Next Pagearrow