Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows 7, after running chkdsk C: /F /R and finding out that my hard disk has 24 KB in bad sectors (log is posted below), I decided to run Windows 7's System File Checker utility (sfc /scannow).

SFC showed the ff. message after I ran it: "Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log."

Since the CBS.log file is too large, I ran findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt" (as per Microsoft's KB 928228 article) to only get the log text pertaining to the corrupt files. (log is also posted below)

How do I troubleshoot and repair the corrupted files mentioned by sfc /scannow?

My OS is Windows 7, 64-bit.


chkdsk log

sfc /scannow log

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

Note: The full log is at http://pastebin.com/raw.php?i=gTEGZmWj . I've only quoted parts of the full log below (mostly from the last part), as the full log won't fit within the character limit for questions. I've added it to serve as a preview.

...
2013-12-28 19:37:50, Info  CSI00000542 [SR] Beginning Verify and Repair transaction
2013-12-28 19:37:55, Info  CSI00000544 [SR] Verify complete
2013-12-28 19:37:56, Info  CSI00000545 [SR] Verifying 95 (0x000000000000005f) components
2013-12-28 19:37:56, Info  CSI00000546 [SR] Beginning Verify and Repair transaction
2013-12-28 19:38:03, Info  CSI00000548 [SR] Verify complete
2013-12-28 19:38:03, Info  CSI00000549 [SR] Repairing 43 (0x000000000000002b) components
2013-12-28 19:38:03, Info  CSI0000054a [SR] Beginning Verify and Repair transaction

...

2013-12-28 19:38:15, Info  CSI0000075d [SR] Could not reproject corrupted file [ml:520{260},l:84{42}]"\??\C:\Windows\System32\migwiz\dlmanifests"\[l:38{19}]"IasMigPlugin-DL.man"; source file in store is also corrupted
2013-12-28 19:38:15, Info  CSI00000760 [SR] Could not reproject corrupted file [ml:520{260},l:84{42}]"\??\C:\Windows\System32\migwiz\dlmanifests"\[l:50{25}]"International-Core-DL.man"; source file in store is also corrupted
2013-12-28 19:38:16, Info  CSI00000762 [SR] Cannot repair member file [l:24{12}]"wbemdisp.dll" of Microsoft-Windows-WMI-Scripting, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, hash mismatch
2013-12-28 19:38:16, Info  CSI00000763 [SR] This component was referenced by [l:202{101}]"Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.WindowsFoundationDelivery"
2013-12-28 19:38:16, Info  CSI00000766 [SR] Could not reproject corrupted file [ml:58{29},l:56{28}]"\??\C:\Windows\SysWOW64\wbem"\[l:24{12}]"wbemdisp.dll"; source file in store is also corrupted
2013-12-28 19:38:16, Info  CSI00000768 [SR] Cannot repair member file [l:56{28}]"Microsoft.MediaCenter.UI.dll" of Microsoft.MediaCenter.UI, Version = 6.1.7601.17514, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, hash mismatch
2013-12-28 19:38:16, Info  CSI00000769 [SR] This component was referenced by [l:176{88}]"Microsoft-Windows-MediaCenter-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.MediaCenter"
2013-12-28 19:38:16, Info  CSI0000076c [SR] Could not reproject corrupted file [ml:520{260},l:40{20}]"\??\C:\Windows\ehome"\[l:56{28}]"Microsoft.MediaCenter.UI.dll"; source file in store is also corrupted
2013-12-28 19:38:16, Info  CSI0000076e [SR] Cannot repair member file [l:24{12}]"ReAgentc.exe" of Microsoft-Windows-WinRE-RecoveryTools, Version = 6.1.7601.17514, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, hash mismatch
2013-12-28 19:38:16, Info  CSI0000076f [SR] This component was referenced by [l:202{101}]"Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.WindowsFoundationDelivery"
2013-12-28 19:38:16, Info  CSI00000772 [SR] Could not reproject corrupted file [ml:48{24},l:46{23}]"\??\C:\Windows\SysWOW64"\[l:24{12}]"ReAgentc.exe"; source file in store is also corrupted
2013-12-28 19:38:16, Info  CSI00000774 [SR] Cannot repair member file [l:82{41}]"System.Management.Automation.dll-Help.xml" of Microsoft-Windows-PowerShell-PreLoc.Resources, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture = [l:10{5}]"en-US", VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, hash mismatch
2013-12-28 19:38:16, Info  CSI00000775 [SR] This component was referenced by [l:266{133}]"Microsoft-Windows-Client-Features-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514.Microsoft-Windows-Client-Features-Language-Pack"
2013-12-28 19:38:16, Info  CSI00000778 [SR] Could not reproject corrupted file [ml:520{260},l:104{52}]"\??\C:\Windows\System32\WindowsPowerShell\v1.0\en-US"\[l:82{41}]"System.Management.Automation.dll-Help.xml"; source file in store is also corrupted
2013-12-28 19:38:16, Info  CSI0000077a [SR] Cannot repair member file [l:18{9}]"hlink.dll" of Microsoft-Windows-HLink, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, hash mismatch
2013-12-28 19:38:16, Info  CSI0000077b [SR] This component was referenced by [l:202{101}]"Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.WindowsFoundationDelivery"
2013-12-28 19:38:16, Info  CSI0000077e [SR] Could not reproject corrupted file [ml:48{24},l:46{23}]"\??\C:\Windows\SysWOW64"\[l:18{9}]"hlink.dll"; source file in store is also corrupted
2013-12-28 19:38:16, Info  CSI00000780 [SR] Repair complete
2013-12-28 19:38:16, Info  CSI00000781 [SR] Committing transaction
2013-12-28 19:38:19, Info  CSI00000785 [SR] Verify and Repair Transaction completed. All files and registry keys listed in this transaction  have been successfully repaired
share|improve this question
    
the log only shows what I already told you. repair Windows with the Inplace upgrade. –  magicandre1981 Dec 29 '13 at 20:19
    
@magicandre1981 I've read your answer. I'll provide feedback once I have tried it. I included the logs (which was already there in the original post) to help other potential answers in providing possible solutions. –  galacticninja Dec 30 '13 at 1:34

7 Answers 7

Although it is possible to repair system files through an upgrade (as detailed above), you should consider whether you really want to do so. If the system file corruption was caused by bad sectors, it's likely that your hard drive is starting to fail. You may not have any more problems for some time, but how long might it be before you experience more corruption? It was system files this time, perhaps it'll be your personal data next time. I would recommend backing up all your data, getting either a new computer or a new hard drive, and then restoring your data onto it. Though more expensive, it's safer in the long run.

share|improve this answer
    
This is only tangentially related to my question, and IMO, is more of a comment and less of an answer. But as a reply to your post, yes, I have indeed made a backup of my important files, and will be replacing the hard drive as soon as I am able to. My hard drive still has life left to it though, as I am still using it daily and no more bad sectors have arised. –  galacticninja Aug 24 at 16:53
    
Its worth taking into account when deciding what to do though. In the longer term, bad sectors and corrupted data is a sign something is wrong, and backing up and replacing the drive is probably the smart thing, even if its not an answer the OP wants to hear. –  Journeyman Geek Aug 25 at 0:46

The only way to fix this large amount of corrupted files in Windows 7 is to do a repair installation/Inplace upgrade.

  • Insert your Windows 7 DVD or mounted a Windows 7 ISO
  • Run setup.exe from the DVD/mounted ISO
  • during setup select upgrade

enter image description here

This repairs Windows but keeps are programs.

share|improve this answer

In Windows 7 and later, SFC's component database is maintained by Windows Update. Running Windows Update will trigger automated repair of the component database, after which you may have more luck with SFC.

share|improve this answer

If SFC /SCANNOW doesn't work, try running it with the computer in SAFE MODE. Make sure that the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp and that they are empty. If not, delete the contents and run SFC /SCANNOW again. See http://support.microsoft.com/kb/929833 for more info.

share|improve this answer

In this case, I would recommend that the hard drive is replaced and a fresh copy of Windows is installed. The store having corrupted or mismatched versions of the system files may be due to the bad sectors of the drive. While it sound like we're cutting to the chase here, it may be better for the long term. You can always pull the data from the old hard drive if having the data is necessary.

share|improve this answer

Run chkdsk C: /F /R from windows instalition dvd,

  1. Boot from Windows 7 dvd.
  2. Press reapeir your computer.
  3. Choose your target system.
  4. In the recovery tool panel choose command prompt.
  5. run chkdsk : /F /R

When you run check disk from instalation dvd, windows try to recover corrupted files and fix them.

I try it and it works every time.

share|improve this answer

If sfc /scannow doesn't work, try this command when running Windows 8:

dism /Online /Cleanup-Image /RestoreHealth

or this command if you are in repair mode of Windows 8 DVD/USB:

Dism /Image:C:\ /Cleanup-Image /RestoreHealth

provided that the broken Windows 8 is on partition C:.

share|improve this answer
    
Although you answer mentions Win 8 the steps are the same for Win 7. –  Big Chris Jun 17 at 15:14
2  
@BigChris and niutech: This doesn't seem to work on Windows 7. I'm getting the ff. error message with the first command: Error: 87 — The restorehealth option is not recognized in this context. — For more information, refer to the help. — The DISM log file can be found at C:\Windows\Logs\DISM\dism.log Do you know the counterpart commands for Windows 7? –  galacticninja Jun 18 at 6:10
2  
From technet.microsoft.com/en-gb/library/hh824869.aspx: "The DISM /ScanHealth, /CheckHealth, and /RestoreHealth arguments can only be used when servicing Windows® 8 or Windows Server® 2012 images." –  Luke Girvin Aug 2 at 10:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.