50

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

8 Answers8

15

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.

3

Run chkdsk C: /F /R from the Windows installation DVD,

  1. Boot from Windows 7 DVD.
  2. Select "Repair Your Computer".
  3. Choose your target system.
  4. In the recovery tool panel, choose Command Prompt.
  5. Run chkdsk <your target drive>/: /F /R

When you run check disk from the installation DVD, windows will try to recover corrupted files and fix them.

I have tried it and it works every time.

Mohannd
  • 207
  • 1
  • 6
2

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:.

niutech
  • 61
1

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.

DustWolf
  • 506
1

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.

1

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.

0

One other thing to try is to install the CheckSUR tool from Microsoft: https://support.microsoft.com/en-us/kb/947821

"SUR" stands for "System Update Readiness".

Its purpose is to repair corrupted system files. (That is: it replaces them with a good copy.) Its name suggests that it's been created for cases when system update wouldn't run, and that it only checks, but in fact it also fixes problems. I don't know whether it only fixes a subset of system files necessary for the update to succeed, or all of them. Perhaps folks who run into this problem can try it, then run SFC again, and let us know if the error went away?

This is for Windows Vista and 7. In Windows 8 it's already installed, and it has been renamed into Deployment Image Servicing and Management (DISM). Hopefully it's not as dismal as it sounds.

-2

best method for Windows 7 , manually copy missing files, i did it today, had 5 files to copy, no SFC error after.

source is in $install_media/source/install.wim . Open with 7-zip and it has the same structure as the windows partition, so copy from the corresponding folder.