My apologies for this long post. I would like to describe the mess I'm in then ask some questions about how to fix it:
Starting up my Windows XP SP1 machine I got the following message:
Windows could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM
Tried restarting several times with same results then Googled the problem. Tried the fix described here:
http://icrontic.com/articles/repair%5Fwindows%5Fxp (since my CPU does not have XD buffer overflow protection I did not set /NOEXECUTE=OPTIN as OS Load Option).
This did not work.
I then found another fix for the problem on hardwareanalysis.com:
Basically, boot to dos prompt (or recovery console if available) and make backups of the following files:-
c:\windows\system32\config\system (to c:\windows\tmp\system.bak)
c:\windows\system32\config\software (to c:\windows\tmp\software.bak)
c:\windows\system32\config\sam (to c:\windows\tmp\sam.bak)
c:\windows\system32\config\security (to c:\windows\tmp\security.bak)
c:\windows\system32\config\default (to c:\windows\tmp\default.bak)
then delete the above files (not the backups!)
then copy the above files in c:\windows\repair to the c:\windows\system32\config directory
restart your computer
This did work (and I wish I'd done it first, since it was completely reversible, unlike the first method). However, afterwards I found that all the user accounts on the PC were gone. I resurrected them by copying the backed up security file back into the system32\config folder (I may have copied the SAM file from backup as well, I cannot remember clearly now).
Now the PC boots up and I can log in. However things are still not right. I tried to alter one of the user accounts and found I could not access the User Accounts in the Control Panel. Microsoft KB 919292 had a fix for the problem. However, the fix failed with a Windows Installer error:
The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if Windows Installer is not correctly installed. Contact your support personnel for assistance.
Windows Installer 3.1 was already installed. I reinstalled it but continued to get the Windows Installer error whenever I tried to run the fix in KB 919292.
I have since noticed another three problems:
1) Several applications on the PC no longer run, eg Microsoft Word. Shortcuts no longer seem to do anything and if I run the executables directly (eg for Word by running C:\Program Files\Microsoft Office\Office10\Winword.exe) I get a message similar to: "Microsoft Word has not been installed for the current user. Please run setup to install the application." even though the executable is clearly visible in Windows Explorer (and even though Word actually opens - the error dialog appears after Word has opened. Clicking OK to the error dialog closes Word).
2) One or the other of the two fixes I tried for the original problem caused new user profiles to be created. eg My old user profile under the Documents and Settings folder was Simon. The old one still exists but there is now a new one called Simon.DBQ2515. Obviously the new one is being used because Opera (my browser that still works) no longer sees the bookmarks file under my old profile.
3) Probably as a result of fooling around with the Security file, when I try to boot off the Windows XP CD and run the Recovery Console I am now asked for the administrator password. The only problem is there is no administrator account on the PC. There is one account, LocalAdmin, that has administrative rights but when I entered the password for that account it did not work. It is so long since I originally set up the PC that I cannot remember if the original administrator account ever had a password and, if so, what it was.
So, my question is: How can I fix this mess? In particular:
1) Having tried the two fixes linked to above, have I irrepairably damaged the Windows instance, requiring a clean reinstallation of Windows + all applications, or should it be possible to get the machine working correctly again without such drastic measures?
2) Is there any way to get around the administrator password so I can use the Recovery Console again, given that there is no account called "administrator" and the password for the one account with admin privileges does not work (and that, before I started the second fix, I was not asked for an administrator password)?
3) Is there any easy way to fix the problem with the applications that think they are not installed?
4) Is there any easy way to fix the problem of the Windows Installer that does not work, even if reinstalled?