Windows 7 System File Checker - A great Windows fix tool.

If Windows 7 develops a problem it can often be fixed by running this utility. 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.

It needs to be run from an Elevated Command Prompt.
Right click: "Command Prompt" in "Start Menu - Accessories".
Click: "Run as Administrator".
Click past the UAC Screen.
In the Command Prompt Type: sfc /scannow and press "Enter"

It might or might not need your Windows Installation Disk in case it needs to fix something. It will let you know if it does. I've seen it go both ways. It'll take a while.

If you get a message saying it couldn't fix some files you can find out which ones. When SFC runs, it logs it's actions to the C:\WINDOWS\LOGS\CBS\CBS.LOG.

Open the Elevated command prompt again.
Type in: findstr /c:"[SR]" %windir%\logs\cbs\cbs.log >%userprofile%\Desktop\sfcdetails.txt and press "Enter". This will place a sfcdetails.txt file on your desktop with the SFC scan details from the CBS.LOG.
Open the sfcdetails.txt and look for the unfixable entries.

The last time I ran this I found this entry.
"2009-08-09 13:16:27, Info CSI 000002db [SR] Unable to complete Verify and Repair transaction because some of the files that need to be repaired are in use. A reboot is required to complete this operation".

All I had to do was reboot to fix it. There were others that it was able to fix. I've had great luck running this utility on Windows 7 and Xp in the past.

Once we get Service Packs for W7 that will open up another issue but not until then. In order to run this on XP SP3 I had to make a Windows XP SP3 Slipstream Disk. It's not a problem on W7 now though. We'll cross that bridge when we come to it.

There's a lot of other info out there on this. You could google for it if you like.
 
Last edited:
A great post Stueycaster! :) Excellent find.. Hopefully others will take advantage of this handy little tool.. ;)
 
Thanks for that Stueycaster. I used sfc quite a lot in Win 98, and it certainly fixed many problems. Didn't know it existed in XP, let alone Vista & Win7. I could have used it a couple of weeks ago, but I'm sure there will future occasions :)
 
I like how you added the command line to copy the details to the desktop file. Without that I would of had to download a third party tool to access the log manually. This is because i was gettting - "access is denied" after i tried opening the log. Thanks! Nice post.
 
As a follow-up to this excellent tutorial, I was inspired to provide a video for those who need assistance and a background on the tool. It can be found on the forum blog here: System File Checker - A great Windows fix tool.

Although a very simple tool, its power and usefulness can not be underestimated in failing environments. Thanks again to stueycaster, and to those who have posted about sfc /scannow.
 
Last edited:
You can use the /VERIFYONLY option to only verify files and do no automatic repairs.

You can also use SFC to verify single files (I think this command only works for Vista and above), for example:
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll

And finally you can scan an offline operating system, I've used this to fix many Vista/Win7 installations that won't boot. (performing a chkdsk and fixing the MBR first, then doing this) For example an offline install of a Windows 7 installed hard drive hooked to a USB adapter thats drive D: for instance:

sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
 
It looks like the issue I was expecting with SP1 isn't there. That was an XP issue. Windows 7 can find the Service Pack entries during verification. This is a good thing. It's another item in the long list of reasons why I love Windows 7.
 
After an unexpected BSOD, I ran SFC and found the following error. All updates installed. Using Avira.
How to Fix??

2011-06-12 18:57:11, Info CSI 0000000d Hashes for file member \SystemRoot\WinSxS\amd64_angelu64.inf_31bf3856ad364e35_6.1.7600.16385_none_450d9d3ea6565bb0\AngelUsb.sys do not match actual file [l:24{12}]"AngelUsb.sys" :
Found: {l:32 b:Omxb1DAJ6YfIaWXfX5K8q5xTlx0XLKQOz95IfFLRWjg=} Expected: {l:32 b:+1wNa/cifPC4G2ItMlDq3NnQtOJc3DCvBVuFANRtAFA=}

2011-06-12 18:57:11, Info CSI 0000000e [SR] Cannot repair member file [l:24{12}]"AngelUsb.sys" of angelu64.inf, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch

2011-06-12 18:57:12, Info CSI 0000000f Hashes for file member \SystemRoot\WinSxS\amd64_angelu64.inf_31bf3856ad364e35_6.1.7600.16385_none_450d9d3ea6565bb0\AngelUsb.sys do not match actual file [l:24{12}]"AngelUsb.sys" :
Found: {l:32 b:Omxb1DAJ6YfIaWXfX5K8q5xTlx0XLKQOz95IfFLRWjg=} Expected: {l:32 b:+1wNa/cifPC4G2ItMlDq3NnQtOJc3DCvBVuFANRtAFA=}

2011-06-12 18:57:12, Info CSI 00000010 [SR] Cannot repair member file [l:24{12}]"AngelUsb.sys" of angelu64.inf, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch

2011-06-12 18:57:12, Info CSI 00000011 [SR] This component was referenced by [l:182{91}]"Microsoft-Windows-Tuner-Drivers-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.INF_angelu64"
 
My machine kept giving the message to format any thumb drive or camera I plugged into a usb port. System file checker fixed the problem! It took a while to find it. It seems like when you google a problem these days, a whole lot of junk answers come up.
 
Thanks for that tutorial.

And what about uncorrected file if pops up after a sfc/ scannow? how to repair it after or what should do?
 
i did sfc/scannow was there problem fix a problem, see a screenshot. I after search log file which was in windows folder and tried to open but ,,access denied" why?

Please help me what should in next.

thanks in advanced.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    4.8 KB · Views: 954
i did sfc/scannow was there problem fix a problem, see a screenshot. I after search log file which was in windows folder and tried to open but ,,access denied" why?

Please help me what should in next.

thanks in advanced.

To view the cbs.log, 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 or Wordpad) where you can analyze it.
 
Back
Top