Recently fixed this problem after much effort and failed attempts.  System restore and safe mode were inaccessible reinstalling windows `over the top` of itself was not an option either as the windows partition was not being recognised which meant only a clean windows install as a last resort.  However I eventually tried the following couple of fixes with the final one doing the trick for me.

Fix 1:-

– Boot with your Windows system CD
– Go into the repair console
– Now change directory to the C:\windows\system32\config (cd blah blah)
– type: rename security security.bak
– enter
– type: copy c:\windows\repair\security .
– enter
– type: exit
– enter
– or reset the computer manually

(Alternate description for same fix)
1. Boot into the recovery console using your Windows XP CD.
2. Type: CHDIR sytem32 and press Enter.
3. Type: CHDIR config and press Enter.
4. Type: Rename Security Security.bak and press Enter.
5. Type: Copy C:\Windows\repair\security and press Enter.
6. Type: Exit and press Enter (this will restart your computer).

If all goes well, your PC should work. If not try this:

Quote from above:
“I had this problem and managed to fix it without a reinstall.
Create the disc at on a good pc and boot off of it on the bad one. Once in go to Start, Programs, Registry Tools, Registry Restore Wizard. Tell it where Windows is installed (C:\Windows usually). Then pick the date that you want to roll back to. I chose the one closest to todays date and it recovered it fine. Reboot and bingo! It’s back. (Well it was for me…!)”

Fix 2:-

How to recover from a corrupted registry that prevents Windows XP from starting

When you try to start or restart your Windows XP-based computer, you may receive one of the following 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 its log or alternate

System error: Lsass.exe
When trying to update a password the return status indicates that the value provided as the current password is not correct.

(Alan – the following fix worked for me although I had to do the bottom part first to get past `access denied`.  Tip the ~ (tilde) symbol on some computers that like to revert to a US keyboard layout without telling you can be found by pressing shift and the ` key (also ` ¬ ) otherwise it is shift and # on UK keyboard layout )

Boot into your Windows CD and choose recovery console or if you can press F8 and boot to DOS/command prompt and type the following (comments in brackets are not to be typed):-

cd \
(the prompt should now be C:\>)
cd system~1\_resto~1
(You will now get a listing of all the restore points, with names like rp1, rp2, etc. You will need to use the one second from last.)
cd rpx (where x is the number of the restore point we are using)
cd snapshot
copy _registry_machine_sam \windows\system32\config\sam
copy _registry_machine_security \windows\system32\config\security
copy _registry_machine_software \windows\system32\config\software
copy _registry_machine_system \windows\system32\config\system
copy _registry_user_.default \windows\system32\config\default

The computer should now restart. Try restarting normally. If Windows still fails to boot, then try an earlier restore point (ie. third, or fourth from last); there is no point in trying more than 3 different restore points.

I get Access Denied message!

On some systems, when you try the second step above, you will get an Access Denied error. In such circumstances, from the Recovery Console (or FreeDOS) Command Prompt, you will need to type in the following commands in bold; press the Enter key at the end of each line:

cd \
cd windows\system32\config
ren system system.bak