How to repair corrupt config\system file.

kcporsche959

Senior member
Oct 17, 2004
205
0
0
So today, i try and boot up my machine, and i notice something weird. The logo that appears on the screen is blue instead of normally being red. I think okay, thats weird but okay. Then, my screen goes to this weird windows screen in teal writing which says that a file under "\windows\system32\config\system" is corrupt and i need to insert my windows cd and repair the missing file. So, i put in my missing cd and i go ot the recovery console. Sadly, it just takes me to a dos prompt which i do not know what the bloody heck i am doing. Also, all the writing seems to be teal instead of the normal white color, which i find to be weird. I did not download any new programs/install anything since i last rebooted my pc. Anyone know how to fix this w/o formatting my hard drive? Thanks.
 

DarkTXKnight

Senior member
Oct 3, 2001
933
0
71
actually before it sounds as if something is fishy with your video card\monitor. That may epxlain the colors. Maybe you had a power surge that's messed up the PC and now it's having boot problems. First thing to do is move to another monitor first and\or switch out the video card. I say it in this order because if is turns out that your machine suffered something electrical, then I would move that hard drive to another machine as a slave and retrieve your data that way. you risk making everything worse if you try to run a repair on the disk and other parts of the machine may be bad.

If you do however choose to leave the drive inside and repair there, then boot with the xp cd, select setup, let the install find your origional install path ( do not choose console repair) and whe it find the path it will give you an option to install a fresh copy (esc) or repair previous installation (r) .. choose R and it will replace any origional windows files and should get you back up. Dont forget to reapply SP2 when youre done.

Good Luck!
 

DarkTXKnight

Senior member
Oct 3, 2001
933
0
71
I would also suggest the checkdisk/r, but the reason I told him to check the video first is because normally when a file is corrupted your font colors do not change. He also says that he hasn't downloaded anything so that could be indicative of a failure in the MB (if it's vidoe or whatnot) and I wouldn't run anythign else on the disk until I was fairly certain that other things in that machine weren't wrong .

OP, are you connected to a KVM??? Ive had the weird colors show up when the video cable to my KVM was bad... I never even noticed until I had to go into command line one day
 

DennyD

Senior member
Oct 29, 2004
224
0
0
This is how you fix the error with your pc - you've got a corrupt registry. It's a simplified version of the Microsoft support article 307545. I do this usually twice a day so it's become rather... common for me so if there's something you dont understand, ask away. But DEFINATELY read it through before you begin.
I'll take the credit if it fixes you up, but if you mess it up I deny ever sending you this info. This message will self-disctruct in 10 seconds... ;) hehehehe

1. Boot to recovery console
2. At the DOS prompt, go to C:\windows\system32\config and then press enter
3. Type the following (not case sensitive)
ren system system2 (press enter)
ren software software2 (press enter)
ren security security2 (press enter)
ren sam sam2 (press enter)
ren default default2 (press enter)


Now type:
copy c:\windows\repair\system (and then press enter)
copy c:\windows\repair\security (and then press enter)
copy c:\windows\repair\software (and then press enter)
copy c:\windows\repair\sam (and then press enter)
copy c:\windows\repair\default (and then press enter)

The next part comes down to timing. The recovery console DOES NOT allow you to eject the CD. So type EXIT and press enter...

As soon as the PC starts, IMMEDIATELY eject the CD and start tapping F8 to enter Safe Mode. The following process ALWAYS goes easier if you log in as Administrator.

1. In My Computer, go to Tools, Folder Options, then the View Tab
2. Choose to Show Hidden Files, and also UNCHECK Hide Extentions... and Hide Protected Operating System Files (click yes to the warning)
3. On the root of the C: drive there should be a folder called System Volume Information. Double Click it.

IF YOU ARE DENIED ACCESS TO IT:
Go to a DOS prompt and then go to the root of the C: and type this: (including the "")

cacls "c:\system volume information" /e /g administrator:f

1. Once inside the folder you should find (usually) 1-3 folders called RESTORE.xxxx (where xxx is random letters/numbers). Take a look in each one until you find a number of folders called RPxx (where xxx is numbers).

2. In the folder containing all the RPxx folders, find the highest one and get the properties of it, specifically the date. Basically you want one that is usually a day or two from the date of the last RP folder

3. Inside the chosen RP folder there is a folder called SNAPSHOT. If there is not, choose another folder - this has been known to happen.

4. Inside Snapshot, rename these 5 files:

registry machine security TO security
registry machine sam TO sam
registry machine system TO system
registry machine software TO software
registry user default TO default

5. Once all 5 files are renamed, make a new folder and call it TMP ( NOT tEmp) and copy the renamed files into it. Verify they are there)

6. Copy the TMP folder to WITHIN the windows folder and then go back to the recovery console.


1. Boot to recovery console
2. At the DOS prompt, go to C:\windows\system32\config and then press enter
3. Type the following
del system (press enter)
del software (press enter)
del security (press enter)
del sam (press enter)
del default (press enter)


Now type:
copy c:\windows\tmp\system (and then press enter)
copy c:\windows\tmp\security (and then press enter)
copy c:\windows\tmp\software (and then press enter)
copy c:\windows\tmp\sam (and then press enter)
copy c:\windows\tmp\default (and then press enter)

Like before, type EXIT and then remove the CD. DON'T GO INTO SAFE MODE NOW. Let it boot normally. You will most likely have to reactivate your copy; it's a pain in the ass but it's better than not using your pc at all. :)

Hope it helps you!
Have a great day!
Dennis
 

pcgeek11

Lifer
Jun 12, 2005
22,227
4,932
136
Exactly like DennyD stated above. I have had to restore the registry on several of my friends PC's. But, if you are not using the system restore feature you may have to reinstall all of your applications.

As these steps restore the registry to the point after windows was installed...
copy c:\windows\repair\system (and then press enter)
copy c:\windows\repair\security (and then press enter)
copy c:\windows\repair\software (and then press enter)
copy c:\windows\repair\sam (and then press enter)
copy c:\windows\repair\default (and then press enter)

the next steps using a restore points will not work if you do not have any... But it will get you back into a functional system GUI.

Print out the knowledge base article, and the associated articles... Then copy and paste the command lines into batch files as suggested in the articles.
KB307545
KB309531
KB318159

Also make a note of the WARNING Noted in the article here:

" Warning Do not use the procedure that is described in this article if your computer has an OEM-installed operating system. The system hive on OEM installations creates passwords and user accounts that did not exist previously. If you use the procedure that is described in this article, you may not be able to log back into the recovery console to restore the original registry hives. "

Hope this helps you out!

pcgeek11