SOFTWARE REVIEWS, PROGRAMMING TIPS, AND SOFTWARE SOLUTIONS FOR ALL YOUR BUSINESS NEEDS.

Recovering From a Corrupt Registry Hive

Added on by Ray Insalaco.

We had a computer come in the office that was getting the following error today:

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

I found sever solutions to fix this, but all of them would cause the registry to be restored to the default Windows installation state.  This does not seem like a very good solution at all.  After digging around trying to find a way to run Windows Restore from the Recovery Console, I found a post that explained how to restore files backed up a Restore Point from the Recovery Console.

The Steps required are:

  1. Log into the recovery console using a Windows install disk.
  2. Navigate to the \windows\system32\config\ directory and rename the file system to something like system.bak
  3. Navigate to the System Volume Information directory.
    cd \
    cd system~1
    cd _resto~1
  4. A quick dir command will give you a list of directories named RP and then  a number.  If you look at the timestamp for these directories it will let you know when the restore point was created.  Look for one that is dated JUST before you started to have this problem and navigate into it.
    cd rp#
  5. Within the RP# directory there will be a directory named snapshot. This is the directory with the registry hives in it, so will want to go there now.
    cd snapshot
  6. The SOFTWARE hive is named _REGISTRY_MACHINE_SOFTWARE and the SYSTEM hive is named _REGISTRY_MACHINE_SYSTEM.  Now we need to copy this hive into the location of the corrupt hive.
    copy _REGISTRY_MACHINE_SOFTWARE \windows\system32\config\software
    or
    copy _REGISTRY_MACHINE_SYSTEM \windows\system32\config\system
  7. With any luck you can now type exit and let Windows reboot.

This solution was information combined from the following two sources:
Running System Restore from the Recovery Console (well, sort of)
How to recover from a corrupted registry that prevents Windows XP from starting