Every now and again, you come across a machine that has the registry die completely, coupled with an error message along the lines of

Windows XP could not start because the following file is missing or corrupt: WINDOWSSYSTEM32CONFIGSYSTEM

To restore the registry is relatively easy albeit drawn out, providing Windows Restore is enabled.

  1. Insert the Windows XP boot CD and boot off it.
  2. Press ‘R’ to enter the recovery console
  3. Select the Windows instance you wish to repair (remember to type the number and not just hit enter)
  4. Make a temp directory by typing “md tmp”.
  5. Create a backup of the current Windows registry by typing the following commands:
    • copy c:windowssystem32configsam c:windowstmpsam.bak
    • copy c:windowssystem32configsecurity c:windowstmpsecurity.bak
    • copy c:windowssystem32configsystem c:windowstmpsystem.bak
    • copy c:windowssystem32configsoftware c:windowstmpsoftware.bak
    • copy c:windowssystem32configdefault c:windowstmpdefault.bak
  6. Delete the current Windows registry by typing the following commands:
    • delete c:windowssystem32configsam
    • delete c:windowssystem32configsecurity
    • delete c:windowssystem32configsystem
    • delete c:windowssystem32configsoftware
    • delete c:windowssystem32configdefault
  7. Copy the Windows repair registry by typing the following commands:
    • copy c:windowsrepairsam c:windowssystem32configsam
    • copy c:windowsrepairsecurity c:windowssystem32configsecurity
    • copy c:windowsrepairsystem c:windowssystem32configsystem
    • copy c:windowsrepairsoftware c:windowssystem32configsoftware
    • copy c:windowsrepairdefault c:windowssystem32configdefault
  8. The type ‘exit’ to reboot the computer.
  9. Get into safe mode by pressing F8 before the Starting Windows screen comes up.
  10. Log in as Administrator
  11. Open My Computer and then the C drive
  12. Click on Tools > Folder Options
  13. Under the ‘View’ tab, select ‘Show hidden files and folders’ and uncheck ‘Hide protected operating system files’
  14. Close the Folder Options window
  15. Open the System Restore folder (if you cannot open the folder, please use this link to find out how to unlock it: http://support.microsoft.com/kb/309531/)
  16. Open the ‘_restore{lotsofnumbers}’ folder that is not the current time (use detail view)
  17. Inside the ‘_restore’ folder, select a recent ‘rp{number}’ folder, these are your restore points, use detail view for dates.
  18. Inside the ‘rp{number}’ folder, open the ‘snapshots’ folder
  19. Copy the following files to c:windowstmp
  20. Navigate to c:windowstmp and rename the files to the following:
    • SYSTEM
    • SAM
  21. Reboot the computer
  22. Using the boot CD, get back into the Recovery Console as described above
  23. Run the following commands to delete the repair registry:
    • del c:windowssystem32configsam
    • del c:windowssystem32configsecurity
    • del c:windowssystem32configsoftware
    • del c:windowssystem32configdefault
    • del c:windowssystem32configsystem
  24. Run the following commands to restore the registry you copied from the restore point:

    • copy c:windowstmpsoftware c:windowssystem32configsoftware
    • copy c:windowstmpsystem c:windowssystem32configsystem
    • copy c:windowstmpsam c:windowssystem32configsam
    • copy c:windowstmpsecurity c:windowssystem32configsecurity
    • copy c:windowstmpdefault c:windowssystem32configdefault
  25. Type ‘exit’ to reboot the computer with the restored registry.

You have now manually restored your Windows XP registry!   On a previous attempt at this a machine did need to re-activate with Microsoft, so ensure that you have an active internet connection or a phone handy in order to activate before you log on.

Update (2011/06/12) – To make your life easier, after step 10, open up System Restore from Start > Programs > Accessories > System Tools (or select the option when prompted), and restore to the previous restore point available. If you want to show off though, by all means use the above.

Share This

Share this post with your friends!