Windows operating system versions previous to Windows 95 stored configuration information in human readable text files like win.ini, system.ini, config.sys, and autoexec.bat. But that method was inadequate for the enormous amount of bloat Microsoft put into Windows 95. In Windows 95 and higher, configuration information is stored in the "registry".
The registry is a bloated hierarchical database used as a central repository for almost all Windows configuration information. If areas of the registry related to hardware and security become corrupted, windows can't start and you lose access to all of your files.
What could cause the registry to become corrupted?
Assuming that the error was NOT caused by an untrained individual directly editing the registry, it could be caused by a virus, a bad software application that uses the registry, a bad RAM chip, a defective hard drive, a sudden loss of power, or cosmic rays (it's possible).
How do you know if it's a corrupted registry that's preventing Windows from starting?
If, When you try to start your computer, you receive one of the following the error messages:
"Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM"
"Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SOFTWARE"
"Stop: c0000218 {Registry File Failure} The registry cannot load the hive (file): \SystemRoot\System32\Config\SOFTWARE"
Or something similar, or you receive the message that a password is not correct when you are positive that you entered the correct password, then it's probable that the registry has become corrupted.
How do you fix a corrupted registry?
With the method described here, you use the Recovery Console to backup the corrupted registry files. Then you copy default repair versions of the registry files to the the \windows\system32\config\ folder. You then use the default repair registry files to start Windows and access archived copies of the registry files that were created by Windows System Restore feature. You copy the registry files that were created by System Restore to a temporary folder and rename them to use as current registry files. Then you use the Recovery Console to move the renamed files to to the \windows\system32\config\ folder.
To learn more about the Recovery Console, see the related article on this Web site.
Is this method guaranteed to work?
Using this method to replace your registry files is serious business, so before you proceed you should be confident that it is a corrupted registry that's preventing Windows from starting. This method does not guarantee full recovery of the system, but it might provide sufficient recovery to let you access to your files.
• Note These instructions assume that Windows XP is installed to the C:\Windows folder. If it was installed to a different location, change C:\Windows in the lines below to the appropriate location.
Step 1 Copy the repair versions of the registry files.
To start the Recovery Console, insert the Windows XP CD-ROM into the CD-ROM drive, and restart the computer. Select the option to start the computer from the CD-ROM drive if prompted to do so. When the "Welcome to Setup" screen appears, press R to start the Recovery Console. Enter the Administrator password when prompted to do so. (if the administrator password is blank, just press Enter).
At the Recovery Console command prompt, type the following to create a folder named temp.
md tmp
Press Enter.
Type the following lines to make backup copies of the current registry files (press Enter after each line).
copy c:\windows\system32\config\system c:\windows\tmp\system.bak copy c:\windows\system32\config\software c:\windows\tmp\software.bak copy c:\windows\system32\config\sam c:\windows\tmp\sam.bak copy c:\windows\system32\config\security c:\windows\tmp\security.bak copy c:\windows\system32\config\default c:\windows\tmp\default.bak
Type the following lines to delete the registry files at the original location.
delete c:\windows\system32\config\system delete c:\windows\system32\config\software delete c:\windows\system32\config\sam delete c:\windows\system32\config\security delete c:\windows\system32\config\default
Type the following lines to copy the default repair versions of the registry files to the \windows\system32\config\ folder.
copy c:\windows\repair\system c:\windows\system32\config\system copy c:\windows\repair\software c:\windows\system32\config\software copy c:\windows\repair\sam c:\windows\system32\config\sam copy c:\windows\repair\security c:\windows\system32\config\security copy c:\windows\repair\default c:\windows\system32\config\default
Type exit to quit Recovery Console.
Your computer should now start. Login as Administrator (If you are using Windows XP Home Edition the person who installed the operating system is the administrator). If the system does not let you accomplish the tasks listed below, restart Windows XP in Safe mode. To start in Safe mode, hold down the F8 key while the computer is starting.
Step 2 Copy the registry files created by System Restore.
Copy the registry files created by the System Restore feature to the \windows\system32\config\ folder.
• If your system is not already configured to make system files visible, change Explorer settings to make them visible (In the Tools | Folder options menu, select the View tab, and under Hidden files and folders, select Show hidden files and folders, and clear the Hide protected operating system files check box.
Double-click the drive where you installed Windows XP to display a list of the folders. Open the System Volume Information folder.
• The System Restore tool uses the System Volume Information folder to store restore points. If you receive the message "Access denied" when attempting to open the System Volume Information folder, right-click on the System Volume Information folder, in the popup menu, select Sharing and Security In the folders Properties dialog box, select the Security tab and click on the Add button. Then type the name of the user to whom you want to give access to the folder.
The System Volume Information folder contains a set of subfolders named _restore .... These are restore points or snapshots of the registry on previous dates. In Explorer, click Details on the View menu to see when these folders were created.
The following is an example of a name of a Snapshot folder:
C:\System Volume Information\_restore{D86480E3-73EF-47BC-A0EB-A81BE6EE3ED8}\RP1\Snapshot
Open a folder with a Date Modified that was created before the registry became corrupted. There may be one or more folders starting with RP ... under this folder. These are restore points.
Open one of these restore point folders to locate subfolder named Snapshot. From the Snapshot folder, copy the following files to the C:\Windows\Temp folder:
_REGISTRY_USER_.DEFAULT _REGISTRY_MACHINE_SECURITY _REGISTRY_MACHINE_SOFTWARE _REGISTRY_MACHINE_SYSTEM _REGISTRY_MACHINE_SAM
Rename the files in the C:\Windows\Temp folder as follows:
Rename _REGISTRY_USER_.DEFAULT to DEFAULT Rename _REGISTRY_MACHINE_SECURITY to SECURITY Rename _REGISTRY_MACHINE_SOFTWARE to SOFTWARE Rename _REGISTRY_MACHINE_SYSTEM to SYSTEM Rename _REGISTRY_MACHINE_SAM to SAM
You now need to delete the default repair registry files and replace them with these files, but you can't do that while Windows is running because Windows is always using the registry files while it's running, so back to the Recovery Console.
Step 3 Use the Recovery Console to replace the default repair registry files.
Start the Recovery Console as described previously, and at the Recovery Console command prompt, type the following lines to delete the default repair registry files. (don't forget to press ENTER after each line).
delete c:\windows\system32\config\system delete c:\windows\system32\config\software delete c:\windows\system32\config\sam delete c:\windows\system32\config\security delete c:\windows\system32\config\default
Type the following lines to copy the System Restore Registry files to the \Windows\System32\Config\ folder.
copy c:\windows\temp\software c:\windows\system32\config\software copy c:\windows\temp\system c:\windows\system32\config\system copy c:\windows\temp\sam c:\windows\system32\config\sam copy c:\windows\temp\security c:\windows\system32\config\security copy c:\windows\temp\default c:\windows\system32\config\default
Type exit to quit Recovery Console. Your computer should restart. Your computer should now be fixed, but restored only to the previous restore point.
More Windows Troubleshooting Articles:
• How To Troubleshoot Your Computer Hardware
• Use chkdsk to Find and Repair Disk Errors in Windows 7
• Troubleshooting a Dead Computer
• Troubleshooting and Maintaining Your PC Desk Reference For Dummies
• How to Create a Vista Boot Disk
• Troubleshooting Windows 10 DHCP is not enabled
• Video - Using the Problem Steps Recorder Tool
• NTOSKRNL Missing or Corrupt Error Message
• Troubleshooting Laptop Power Issues
• Windows 10 Built-in Troubleshooters