Sunday, January 17, 2010

1/11 Fix corrupted system files with the System File Checker

If you encounter a strange behavior of your system or if the system sends you a message indicating that some system file is damaged, the System File Checker might be able to help. Here is what you do:

Open an elevated Command Prompt (go to Start > All Programs > Accessories > right click on Command Prompt > Run as Administrator).

Type sfc /scannow into the Command Prompt window – note the blank in front of the slash (/). This will run for a while.

When it is done, you can end up with the following different results:

1. SFC did not find any corrupted files

2. SFC did find corrupted files and was able to fix the files

3. SFC was not able to fix all corrupted files

SFC stores the results in the CBS.log which you find in C:\Windows\Logs\CBS\CBS.log. This is a massive file of approximately 5MB and if you care to see it all, you must send CBS.log to one of your own folders or the desktop from where you can double click on it. It will then open with Notepad. Note: You cannot open it inside the CBS folder. You will get an Access denied message.

But most likely you are only interested in the part that shows the corrupted files that were fixed – or not fixed. For that you need a significant data reduction. You do that as follows:

Open another elevated Command Prompt and paste this command into it:

findstr /c:"[SR]" %windir%\logs\cbs\cbs.log

This will show all the files you want to see in the Command Prompt window.

Since that window is not very practical for a detailed study, you want to paste the content into a Notepad, Wordpad or Word file.

For that you right click on the Command Prompt window (any place is good) and click Select All. Then you right click anywhere in the window. Now this whole text is stored on the clipboard and you can paste it into a document file (e.g. Notepad) where you can analyze it.

A word of warning: If you have tweaked your system and modified system files, the System File Checker may undo your tweaks.

No comments:

Post a Comment