Posts Tagged ‘windows xp installation’

Windows XP Crash Recovery – When all else Fails

January 21st, 2011 1 comment

WARNING: Do not use the procedure described in this post, if your computer has an OEM-installed operating system (Dell, HP, Compaq, etc). The system hive on OEM installations creates user accounts and passwords that were not there previously. If you use the procedure described in this post, you may not be able to log back into the recovery console to restore the original registry hives.


  • This post assumes that you have tried other recovery methods and still can’t access the system, except by using Recovery Console. If you haven’t tried other methods of recovery yet, try them first. Click here to know a few other methods of recovery, before you try this method. However if you’ve already tried the other methods, go ahead and try the one mentioned below.
  • Make sure to replace all five registry hives. If you replace only a single hive or two, this can cause problems because software and hardware may have settings in more than one location in the registry.
  • This procedure assumes that Windows XP is installed to the C:\Windows folder. Make sure to change C:\Windows to the appropriate windows folder if it is in a different location.

Since your Windows already crashed, you’re probably viewing this post on another computer. It’s better if you take a printout of this post, because you’ll have to type many commands to recover your corrupted Windows XP installation. Even if you don’t have to type them, it’s better to have a printout. If you don’t want to print the images, here’s a text-only version of this post.

It’s possible that somehow your Windows registry is corrupt. But there is a backup of the registry! Since Windows doesn’t start, we’ll have to restore this backed up registry files, manually. How do you do that? Follow the procedure detailed below.

1. Boot the computer with your Windows XP CD in the drive. If you see a message like "Press any key to boot from CD …", go ahead and press a key on your keyboard.


2. If you don’t see any such message or if your computer doesn’t boot from the CD, go into your BIOS/CMOS setup, by rebooting the computer and pressing the appropriate key (like F1, F2, F10, DEL, etc).


3. If you don’t even see the message to press the above keys to enter the BIOS setup, read your motherboard manual on how to enter the BIOS setup. These videos about BIOS and CMOS may be helpful too:

4. Now, when booting from the XP CD, when you see the Welcome to Setup screen, press R to start the Recovery Console.


5. You will see the following screen. Type 1 and press the Enter key. You’ll have to enter the Administrator password. If you didn’t set a password, when you installed Windows XP, just press the Enter key.


NOTE: If you have access to another computer, to save time, you can copy the text in step six and seven, and paste it in a text file called "Regcopy1.txt" (for example). You can also download this text file and save it on a USB pen drive, before you run the below command. To use this file, run the following command when you start in Recovery Console:

batch regcopy1.txt

To know, how to access files on other drives when in the recovery console (USB pen drive, for example), type the following three commands, one per line, and press the Enter key after each command (make sure to type the space on both sides of the equal sign):

AllowWildCards = TRUE
AllowAllPaths = TRUE
AllowRemovableMedia = TRUE

6. Now type the commands you see below, one per line and then press the Enter key, after each command:

md c:\tmp
copy system c:\tmp\system.bak
copy software c:\tmp\software.bak
copy sam c:\tmp\sam.bak
copy security c:\tmp\security.bak
copy default c:\tmp\default.bak
del system software sam security default

After you enter each of the above copy commands, the system will reply with a message like "1 file(s) copied".

7. Now, type this set of commands, one per line and press the Enter key after each (Take care to type the space and the dot as shown):

copy c:\windows\repair\system .
copy c:\windows\repair\software .
copy c:\windows\repair\sam .
copy c:\windows\repair\security .
copy c:\windows\repair\default .

8. Now type exit and press the Enter key. The system will reboot.

9. Remove the CD from the drive and boot into Windows normally, as you do before. If, even after doing each of the above steps correctly, Windows doesn’t boot, you’ll have to do a clean install of Windows, after taking a backup of your data. There is no other way to recover.

But, the question is – How do you take a backup of a computer which doesn’t even boot or start Windows? Click here to read more on this topic and backup your computer before you format the hard drive or reinstall Windows from scratch.

However, if the system boots into Windows, then do the following:

a. Start Windows Explorer. On the Tools menu, click Folder Options and then click the View tab.


b. Under Hidden Files and Folders, select the radio button "Show Hidden Files and Folders", and then clear the "Hide Protected Operating System Files (Recommended)" check box. Also clear the "Use Simple File Sharing (Recommended)" checkbox. This is the last checkbox under the Advanced settings, so you’ll have to scroll down.

c. Click Yes when a dialog box is displayed. Then, click OK to close Folder Options.

d. Now, check whether you have an NTFS or a FAT32 file system. How do you check if you have NTFS or FAT32 file system? In My Computer or Windows Explorer, right-click the C drive (or your Windows drive, if other than C) and then click Properties.


e. If the file system on C drive is NTFS, Windows won’t let you open this folder, but there’s a solution. Under the C drive, right-click on the System Volume Information folder and select Properties. In the drive properties, click the Security tab. Click the Add button, and then in the box that’s labeled "Enter the object names to select", type the username that you use to log on to Windows. This is shown in the image below.

If your file system is FAT32, you don’t have to do anything like the above. You can access the System Volume Information folder without any problems.


f. Now, open the System Volume Information folder. This folder appears dimmed, that’s fine.

g. This folder contains some _restore {GUID} folders such as "_restore{87BD3667-3246-476B-923F-F86E30B3E7F8}". Open a folder that was created before the current date and time. You may have to click Details on the View menu to check this.

h. There may be one or more folders starting with the name "RP x", under this folder. These are the restore points. Open one of these folders to locate a Snapshot subfolder.


i. The following path is an example of a folder path to the Snapshot folder:

C:\System Volume Information\_restore{D86480E3-73EF-47BC-A0EBA81BE6EE3ED8}\RP1\Snapshot

j. From the Snapshot folder, copy the following files to the C:\tmp folder with the mouse (by Ctrl-clicking them):



k. Rename the above five files as given below (using the mouse or the F2 function key):

_registry_user_.default        default
_registry_machine_security     security
_registry_machine_software     software
_registry_machine_system       system
_registry_machine_sam          sam

l. Once again, put your Windows XP installation CD into your CD Drive and reboot the computer.

m. Again, press R for the recovery console when you see the message for recovery, just like you did in step 4 above.

NOTE: If you have access to another computer, to save time, you can copy the text commands in step n, and paste it in a text file called "Regcopy2.txt" (for example). You can also download this text file and save it on a USB pen drive, before you run the below command.To use this file, run the following command when you start in Recovery Console:

batch regcopy2.txt

n. At the console, type these commands one per line and press enter after every command (take care to type the dots exactly as shown in each command):

del sam security software default system
copy c:\tmp\software .
copy c:\tmp\system .
copy c:\tmp\sam .
copy c:\tmp\security .
copy c:\tmp\.default .

o. Now, type exit and remove the CD. Boot normally into Windows and you must be back to normal. In case, the restore point is not the one which you wanted, you can use the System Restore to restore a different restore point. This time you are already in Windows so you don’t have to use the recovery console. For more information, how to use the System Restore in Windows XP, click here.