Wednesday, August 26, 2009

How to Manually Repair a Corrupt Windows XP Registry

Step 1

Backup your data. Even if Windows will not boot you can use a HDD imaging tool to copy the files to another disk. Always make a backup before editing the registry.
Step 2

Insert your Windows XP CD and reboot the PC. Boot from the CD and when prompted press 'R' for the Recovery Console.
Step 3

Select your Windows installation from the options provided and then enter the administrator password.
Step 4

At the command prompt enter the following pressing ENTER after each line:

md tmp
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

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

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
Step 5

Type "exit" and press ENTER. Your PC will reboot.
Step 6

When the PC starts to reboot press F8. At the boot menu select Safe Mode and press ENTER.
Step 7

Log in as the administrator and open Windows Explorer. Go to Tools->Folder Options and then click on the View tab. Check Show Hidden Files and Folders and uncheck Hide Protected Operating System Files. Click Yes when prompted.
Step 8

Browse to C:\System Volume Information\_restore{23BEBE69-7A98-4EC2-845F-1AAC4DFC8C47}, the numbers and letters in the braces will be different on your system. Once in this folder find the RP#, # being a number, folder that was modified last before the problem occurred.
Step 9

Next open the Snapshot folder. From the Snapshot folder, copy the following files to the C:\Windows\Tmp folder:

_REGISTRY_USER_.DEFAULT
_REGISTRY_MACHINE_SECURITY
_REGISTRY_MACHINE_SOFTWARE
_REGISTRY_MACHINE_SYSTEM
_REGISTRY_MACHINE_SAM
Step 10

Rename the files in the C:\Windows\Tmp folder as shown below:

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
Step 11

Again boot from your Windows XP CD and press 'R' to enter the Recovery Console. At the command prompt enter the following pressing ENTER after each line:

del c:\windows\system32\config\sam 
del c:\windows\system32\config\security 
del c:\windows\system32\config\software 
del c:\windows\system32\config\default 
del c:\windows\system32\config\system 
copy c:\windows\tmp\software c:\windows\system32\config\software 
copy c:\windows\tmp\system c:\windows\system32\config\system 
copy c:\windows\tmp\sam c:\windows\system32\config\sam 
copy c:\windows\tmp\security c:\windows\system32\config\security 
copy c:\windows\tmp\default c:\windows\system32\config\default
Step 12

Type "exit" and press ENTER. Your PC will reboot.
Step 13

Allow your PC to boot into Windows normally. Once Windows starts go to Start->All Programs->Accessories->System Tools->System Restore. Here you can restore to a previous restore point

No comments:

Post a Comment