Wednesday, December 29, 2010

How to Repair Windows 7 System Files with System File Checker





Information
The sfc /scannow command (System File Checker) scans the integrity of all protected Windows 7 system files and replaces incorrect corrupted, changed, or damaged versions with the correct versions if possible.



Warning
Be aware that if you have modified your system files as in changed theme explorer/system files, running sfc /scannow will revert the system files such as explorer.exe back to its default state. Make the appropriate backups of your system files that you have modified for theme if you wish to save them before running sfc /scannow.


OPTION ONE

To Run the SFC /SCANNOW Command

1. Open a elevated command prompt.

2. To Scan and Repair System Files

NOTE:
Scans the integrity of all protected system files and repairs the system files if needed. Please see red WARNING box at the top of this tutorial.

A) In the elevated command prompt, type sfc /scannow and press Enter. (see screenshot below)

NOTE:
This may take a little bit to finish.



B) Go to step 4.

3. To Only Verify if the System Files are Corrupted

NOTE:
Scans and only verifies the integrity of all protected system files only. This command will not change your system files as in the red WARNING box at the top of this tutorial.

A) In the elevated command prompt, type sfc /verifyonly and press Enter.

4. When the scan is complete, hopefully you will see all is OK like the screen shot below.

NOTE:
If not, then you can attempt to run a System Restore using a restore point dated before the bad file occurred, to fix it. You may need to repeat  a System Restore until you find a older restore point that may work.



5. When done, close the elevated command prompt.




OPTION TWO

How to See and Read the SFC /SCANNOW Scan Results

NOTE:
When SFC runs, it logs it's actions to the C:\WINDOWS\LOGS\CBS\CBS.LOG. This will show you how to see only the specific SFC entries with the [SR] tags in the CBS.log. This can be helpful to show you what files SFC could not fix automatically if you wanted to try and manually replace them. For more on this, see: How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program generates in Windows Vista.


2. In the elevated command prompt, copy and paste the command below and press Enter. (See screenshot below)

NOTE:
This will place a sfcdetails.txt file on your desktop with the SFC scan details from the CBS.LOG.

Code:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >%userprofile%\Desktop\sfcdetails.txt



3. Close the elevated command prompt.

4. Open the sfcdetails.txt file on your desktop to see the SFC scan details in the CBS.LOG.

5. You can safely delete the sfcdetails.txt file afterwards if you like.

Tip:
If you need to replace a corrupted system file that SFC cannot fix, then this will show you how to by extracting a new copy directly from your Windows 7 installation DVD.

Extract Files from Windows 7 Installation DVD

Related Posts Plugin for WordPress, Blogger...

Search This Blog

Followers

Twitter Delicious Facebook Digg Stumbleupon Favorites More