We have already seen how the System File Checker allows users to scan for and restore corrupt Windows system files. We have also seen how to run System File Checker and more, earlier. But what if at the end of the run you see the following message?
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.
What this message says is that although the System File Checker completed the scan and found corrupted system files, it was unable to proceed and replace them with good system files.
The Windows Resource Protection protects registry keys and folders as well as critical system files. If any changes are detected to a protected system file, the modified file is restored from a cached copy located in the Windows folder itself.
Windows Resource Protection found corrupt files but was unable to fix some of them
If you receive this message and the System File Checker is not able to do its job when you run it, here are a few things you can try.
- Run SFC at Safe Mode
- Run SFC at Boot-Time
- Use DISM
- Try Reset This PC or Fresh Start
- Check the Log files
You will need admin permission to execute these suggestions.
1] Run SFC in Safe Mode
Boot into Safe Mode. Open an elevated command prompt window, type sfc/scannow, and press the Enter key.
Just make sure that the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp. This may help if some start-up programs are creating a problem.
2] Run SFC at Boot Time
If you wish to or need to, you may run System File Checker at Boot Time. This is one option that may help you as it will run System File Checker before Windows loads.
Go here to learn how to run sfc /scannow at Boot Time. See if this helps.
3] Use DISM
Use DISM. Open an elevated command prompt and run the following command and hit Enter:
Dism /Online /Cleanup-Image /RestoreHealth
This command checks for component store corruption, records the corruption, and FIXES the corruption. It may take a while though! Useful if System File Checker is not working.
4] Try Reset This PC or Fresh Start
On Windows 11/10, try Reset This PC or Fresh Start. On Windows 8.1, carry out a Refresh or a Reset operation. An Automatic Repair is also an option you may want to consider if you think it applies in your situation. On Windows 7, carry out a Startup Repair or Repair Install or an In-place Upgrade as you think may best suit your situation.
To perform an In-place upgrade in Windows 7 or Windows Vista, back up your documents, close all open applications, and then insert the Windows DVD in the DVD drive. In the Setup window, click Install Now. Click Go online to obtain the latest updates for installation (recommended). Type the CD key if you are prompted to do this. Next, select the operating system on the Install Windows page you want to Upgrade or In-place and click Yes to accept the Microsoft Software License Terms. Next click Upgrade when asked Which type of installation do you want. Once the process is completed, restart your PC.
5] Check the Log files
You may also want to consider this option. Open the CBS.log file and view details of the corrupted files and replace the corrupted file with a known good copy manually. Navigate to C:\Windows\Logs\CBS you will be able to see and open the SBS.log file.
Check if it shows some errors or a message. That may give you a direction to proceed. You can get more details on how to do this manually, here at KB929833.
I hope something helps you.
How do I fix a corrupted CBS log file?
If the CBS log file is corrupted there is actually nothing else you can do. The best way would be to delete it and then ret Windows recreate it when the need arises.
How do I fix corrupted files in SFC Scannow?
To fix corrupted files that SFC Scannow cannot fix, you need to run the DISM Tool or use the Reset This PC option. That is sure to help you.
Can I recover corrupt files?
Since it is already corrupted, there is not much you can do about it. The only thing you should do is find what is causing the corruption and then collect the log again. If at all, then the SFC command may help, but then there is no guarantee about it.
What causes files to corrupt?
It is difficult to pinpoint one reason, but it can be both software and hardware problem. If the data that is collected gets overlapped by another program, then it can corrupt the software. Hardware corruption usually happens on old data, but if you are seeing it in more than one place, you need to check your device.
These links may interest some of you:
Another great tip. I’ve been struggling with this problem for a while now and have never heard of DISM until now. Going to give it a try and see if it works.
Could you help me to solve a problem with dism ??
Every time I run it I recieve : “Error:50. DISM does not support servicing Windows PE with the /Online option.”
I Hope you can help me.to solve this
Thanks in advance
Does this help in any way? http://forum.thewindowsclub.com/windows-tips-tutorials-articles/35870-dism-does-not-support-servicing-windows-pe-online-option-windows-8-a.html
Thanks ,but that Didn’t help me :(.
I have the same OS installed in anotther computer and the /online option works fine.
Dism /Online /Cleanup-Image /RestoreHealth
I need to do this because winduws update does not work, but in command prompt I get the message that this command is not known.
What can I do?
The command is correct. Hope you are running CMD as admin.
The above command doesn’t work on windows 7 as the only options to follow cleanup-image / are /revertpendingactions and /spsuperseded
Thanks. I am doing it now. process is going on ..
I’m running this as admin. Says cleanup-image is unknown.
Do you have any idea what I could do now?
Nothing is working for me! My computer must be pretty screwed up!
I failed to install the update of kb3001237 in windows 8.1 and getting an error of 80073712.( It was updated from windows 8 preinstalled by windows 7 home premium) following this I used sfc scan but its giving a message that windows resource protection found corrupt file. The scan health saying The component store is Repairable. Restore health showing the source file could not be downloaded. Error 800f0906. I did a clean boot also. Recently I Installed 15 more update successfully except this and kb3004150. Both related to internet security. I used the component cleanup command but its showing error 800f0806. I cleaned the temporary windows update files as instructed from Microsoft windows community. Can you help me.
Please see if something here helps you: https://www.thewindowsclub.com/windows-update-agent-corrupt-error-80073712
Make sure there’s no spaces between the forward slash and the next word
Make sure there’s no spaces between the forward slash and the next word.
I just got a new HP laptop in 8.1…when I ran a windows security update I was told by HP that my Kaspersky antivirus & Windows Defender were NOT compatible & have corrupted some files. I ran the System file checker & got the exact message as above. Now I’m getting an error message that my Windows License will expire in 2 weeks. My computer is running fine, except that I did get the blue screen of death after the windows security package update & the computer would NOT boot up. Finally it did, but then I got subsequent updates from HP, Kaspersky & Malware Bytes…I called Costco Concierge & they told me that HP will either give me a new computer or reinstall Windows…I have a backup, but don’t want to have to reinstall all my software….HELP Please!!!
I have Windows 8 and the CMD that worked for me was c:Windowssystem32>dism.exe /online /cleanup-image /restorehealth , there is a space between the .exe and /online. It took about a minute to start but its works.
Perhaps you can advise me… I’ve run sfc and gotten the ‘unable to fix some’ message. The CBS.log is long and a bit of a mess to read… rather than going line by line, is there some keyword or phrase I could search to make finding the problem(s) easier?
(I’ve run sfc because I have been getting chronic BSOD’s for ‘Reference_by_pointer’… and using Windbg on MEMDUMP indicates a probable cause by afd.sys …using Device Manager, I’ve checked for updated drivers for everything, but the afd.sys problem is not yet fixed.)
This is actually really helpful. Thank you.
I am trying this as an alternative to doing yet another System Restore because now, all of a sudden, my PC will not finish shutting down. I click Shut Down, and it goes to the blue screen that says SHutting Down, but just hangs there forever, and never actually shuts down. I am NOT happy with Windows 7 64 bit truly, but my fingers are crossed that this will fix the issue!!
None of the above helped my situation. Refreshing is not possible, as it “could not find the recovery environment”, and I don’t have installation or recovery media. Connecting to the internet is impossible, so DISM doesn’t work. And the file at C:WindowsLogsCBS is way too long.
Whenever i play a game i get the blue scree of death and usually memory management and other things. my friend says my windows is corrupt. he says het new windows anyone know how? also when i do this it says the source files could not be found. Windows 10
When I try to run DISM I get error 740 and it closes on me right away.
Everything seems to be geared for Windows 8.1. I still have Windows 7 Pro and do not want to “upgrade” to 8 or 10. In fact, i believe it was the unsuccessful upgrade to Win10 that created to missing files in the CBS log.
Furthermore, my ASUS MB is not compatible with Win 10. If I had know that upfront, I would have never even tried the upgrade. What a mess. The methods you give to repair the errors do not work in Win 7. Please help.
I got the very same “…?found corrupt files but was unable to fix some of them” msg so I got interested in his page and wanted to try the specific Dism command you advocated?:
?
????Dism /Online /Cleanup-Image /RestoreHealth
?
…?but that last parameter “RestoreHealth isn’t available as a sub-parameter of “Cleanup Image” (running Windows®?7 Home Premium -x64). The only 3 parameters that appear to be available for adding after “Dism /Online /Cleanup-Image” are?:
?
????(1)?Dism /Online /Cleanup-Image /RevertPendingActions[/b]
????(2)?Dism /Online /Cleanup-Image /spsuperseded[/b]
????(3)?Dism /Online /Cleanup-Image /ScanHealth[/b]
?
…?so of course I ran the third one, “ScanHealth”, as it at least has some bearing on what you said. It
ran successfully (took about 7 min) and produced a very short (1??KB) log report at?…
?
????%windir%logsCBSChecksur.log
?
…?which I looked at and in summary contains a series of lines beginning with “Checking . . .” followed by the name of the entity being checked, and the upshot is that all of those entities checked out okay WITH THE EXCEPTION OF ONE, and there are 3 pieces of information pertaining to that one which identify it?:
?
????•? CSI Payload File Missing
????•? MSDTC.LOG
????•? amd64_microsoft-windows-com-dtc-
????????runtime_31bf3856ad364e35_6.1.7600.16385_none_7547f48c79b40229
?
(note the line break in the third item is only for display purposes here and is actually one long continuous filename)
I happen to have a second (and properly working) installation of Windows®?7 on this computer (the only difference being this one is Professional instead of Home Premium) and saw that the third item above, with the very long name, is actually a folder which is under the?:
?
???? %windir%winsxs
?
…?directory on that second installation, and in that folder there is indeed a MSDTC.LOG file. It bears what looks like the regular Notepad icon, and bears no further hidden extension after the “.LOG”, yet if I try to open it in Notepad it’s obviously a binary file, NOT a text file.
Interestingly, on that second installation there is a second file, ALSO called MSDTC.LOG, this one in the?:
?
????%windir%System32
?
…?folder, only the (Notepad-like) icon of that second copy of MSDTC.LOG has a PADLOCK on it. I figured that would mean the file is read-only, or otherwise protected, and this may be the case, but I checked and the read-only attribute is NOT set, so whatever.
I can also absolutely confirm that, on the FIRST installation, i.e. the one on which I am trying to resolve the problem?:
?
????•? while I *do* have the “amd64_microsoft-windows-com-dtc . . .” runtime folder present
???????under the “%windir%winsxs” directory, the “MSDTC.LOG” file is indeed *not* present,
???????as the Dism tool log file reported
?
My inclination at this point was to simply copy the MSDTC.LOG file from the working installation to this one, in both the required “%windir%winsxsamd64_microsoft-windows-com-dtc . . .” folder as pointed out by the Dism log and in the “%windir%System32” folder (because why not). What made me pause though is the fact I saw that, while I am in fact lacking the MSDTC.LOG file?:
?
????•? in the “%windir%winsxsamd64_microsoft-windows-com-dtc . . .” folder there is in fact
???????present an application, a tool of some kind, called MSDTC.EXE ?(?!?)
?
Whew. So, after all that . . . what is the opinion of this article’s author?! Should I just copy the two MSDTC.LOG files over (or maybe only the required one, not necessarily the one in %windir%System32)? Or does the presence of that MSDTC executable tell me I should run THAT instead, and it will create the required files which are missing and causing the whole problem to begin with?
Or do you possibly have a completely different recommendation? And thank you!
?
WOW!!! DISM fix the problem.. thnks a lot man.. *salute*
when I run Dism /Online /Cleanup-Image /RestoreHealth i am told that C:Windows is not a valid windows directory. Please advise
When its fixed….
Buy a HDD clone machine (bout $20).
Buy a HDD/SSD Exactly the same as the one you use for Windows.
Clone your working HDD/SSD to the other, and use it to re-clone back for when it all goes belly up.
Update the clone once every 2 months or so.
I know this is an old comment, but you cannot do a repair on a PE version since PE’s are usually for either installing, or one time boot. Just rebuild your PE image from scratch.
Install latest Windows SDK for Windows 7.
Install latest Windows SDK for Windows 7. This will update dism for you.
Great info and still valid today. This can also be caused by permissions issues when SFC attempts to ‘repair’ corrupt files, which can be fixed using Microsoft PSEXEC (Google PSEXEC download and use the Microsoft link) using the following command from an elevated/admin command prompt:
PSEXEC -h -s SFC /SCANNOW
That will launch the System File Checker elevated and will run 1 notch higher than local admin, as SYSTEM. The same can be performed with the DISM command as well.
PSEXEC -h -s Dism /Online /Cleanup-Image /RestoreHealth