Windows 7 – How to Repair Corrupted Files Found by sfc /scannow

sfcwindows 7

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

Best Answer

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.

In 2015, Microsoft backported a DISM command from Windows 8 to Windows 7 to repair files. Look if it is possible to install the update KB2966583, open a command prompt as admin and run DISM /Online /Cleanup-Image /Scanhealth to try to repair files. But if this fails, try the inplace upgrade. Still is still the best option for Windows 7 to make sure it gets fully repaired.

Related Question