# Repairing corrupt System32\Config\System file on Windows XP

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

I tried restarting several times with the same results and then googled the problem. I tried the fix described in Repairing Windows XP in Eight Commands (since my CPU does not have an 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 a 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.

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 I 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, for example, Microsoft Word. Shortcuts no longer seem to do anything and if I run the executables directly (for example, 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).

1. One or the other of the two fixes I tried for the original problem caused new user profiles to be created. For example, 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.

2. 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 a 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 an easy way to fix the problem of the Windows Installer that does not work, even if reinstalled?

-

## migrated from stackoverflow.comNov 22 '09 at 20:47

This question came from our site for professional and enthusiast programmers.

Simon,

It seems that the issue is that you replaced your corrupt registry with a default registry in which the programs were not installed. If you have any system restore points from before the corruption you can restore your registry from there and that should resolve most of your issues.

-
system restore from an administrator account will get it back before the problem. –  mike Nov 23 '09 at 18:02

Use third-party software like Ubuntu. This will ignore permissions and allow you to navigate to your configuration folder to overwrite the corrupted SAM hive file, where passwords are stored.

-
Ubuntu is an OS, not really "software". –  Lorenzo Von Matterhorn Dec 17 '12 at 17:23
Ubuntu really is software (but not an application). It is a valid suggestion to use another OS to manipulate files for the first OS that would otherwise be locked or read-only. –  Peter Mortensen yesterday

I tried doing a system restore, as per Justin and Mike's suggestions. However, the System Restore dialog just came up as a blank window, without any controls of any kind. So I wasn't able to perform a system restore.

In the end I solved the problem by reinstalling Windows from my system disc. It fixed all the problems with the operating system without affecting the user accounts or any data on the hard disk.

The problem with the applications persisted. Only some applications were affected, most notably Microsoft Office (strangely, all the Office 2003 applications were affected but not Access 2000 and Visio 2000, which were also installed). I assume it was only applications that used the registry that were affected. I uninstalled the applications then reinstalled them to fix the problems.

So everything was fixed but only because I still had the system disc and the Office installation disc.

-
If you could have gotten in using either Safe Mode, or Last Known Good Configuration, i would have done a System Restore then. –  Ian Boyd Dec 29 '09 at 15:01