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.
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:
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.
- Joined
- Jul 22, 2005
- Messages
- 9,241
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.
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:
- Joined
- Aug 3, 2010
- Messages
- 1,288
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
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
- Joined
- Feb 5, 2009
- Messages
- 1,706
- Thread Author
-
- #7
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"
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"
Polanve
New Member
- Joined
- Oct 17, 2011
- Messages
- 2
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.
kaitokid11
New Member
- Joined
- Feb 12, 2014
- Messages
- 16
Thanks, I forgot about this. I used to use it in early editions of windows. Run it and sorted some errors.
IONx64
New Member
- Joined
- Apr 7, 2014
- Messages
- 19
whs
Extraordinary Member
- Joined
- Sep 17, 2009
- Messages
- 1,537
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.
Similar threads
- Featured
- Article
- Replies
- 0
- Views
- 1K
- Replies
- 0
- Views
- 616
- Article
- Replies
- 0
- Views
- 144
- Replies
- 0
- Views
- 419
- Featured
- Question
- Replies
- 0
- Views
- 405