The Windows utility System File Checker can assist in repairing corrupted system files and registry keys. The scan is launched from the Terminal application and can check the authenticity of files and repair corrupted files by replacing them with functional files from the source.
The SFC utility does the job effortlessly. All you have to do is open a command prompt, enter the SFC /scannow
command, and let the utility fix the problem on its own.
In most cases, this is a quick and easy process. However, there are situations where corrupted system files cannot be repaired. In these cases, you may see the error message "Windows Resource Protection found corrupt files but was unable to repair some of them".
Windows Resource Protection (WRP) is integrated into SFC scanning to protect critical system files and registry keys. Some resources are inaccessible even to administrators because they are protected.
So, when you receive a Windows Resource Protection error message, it means that the SFC utility and WRP scanned and found corrupt system files but were unable to repair them by replacing them with cached files. This can happen if the cache file used to replace the corrupted file itself is corrupted. Apart from system file corruption, there are other possible reasons why you may receive the "Windows Resource Protection found a corrupted file..." error. Let's take a look at a few of them:
Of course, you may not be able to pinpoint exactly which of these are causing SFC scan errors. Nonetheless, the CBS.log file, which records details about the scan, can be useful in identifying irreparably damaged files.
The CBS.log file mentioned in the error contains information about each time SFC is run on the computer, including information about corrupted files that cannot be repaired.
CBS log files are located in the following folder:
C:\Windows\Logs\CBS\CBS.log
Press Win E
and navigate to the above file location to open File Explorer.
To read the log, just double-click the file. The file will open in Notepad.
Here, use SFC to verify that the corrupted file's last check date and time are incorrect. To learn how to manually replace corrupted system files with good copies, see Fix #5 below.
Now that you understand the terminology behind the error and what it means, Let's see how to fix it.
The local utility DISM (Deployment Image Servicing and Management) can be used to inspect and repair Windows images. It is possible to easily fix errors that are not fixed by SFC using the DISM system image repair command. Here's how to run them:
Press Start, type CMD, then right-click Command Prompt and select Run as administrator.
Now, type the following command:
dism /online /cleanup-image /restorehealth
Then press Enter. Wait for the process to complete.
After the scan is complete, restart the system and try running the SFC command to check if the error persists.
Check Disk is a native utility designed to check and repair disk errors. Such errors can occur even if the system files are located in corrupt sectors. Running a CHKDSK scan and repairing disk errors is useful as this ensures that the SFC scan can successfully repair system files.
Open the command prompt as shown above. Then type the following command to run the Check Disk utility:
CHKDSK /C /f
To schedule the scan at the next startup, Please press Y
.
Then press Enter.
Restart your computer and wait for Check Disk Utility to finish fixing disk errors. Once completed, run the SFC scan command to see if the problem still exists.
Another way to check the C: drive is from File Explorer. To do this, press Win E
and open File Explorer. In the This PC window, right-click the C drive and select Properties.
Click on the " Tools " tab.
Then click "Check" under "Error Checking".
When prompted, simply click "Scan Drive".
Wait for the scan to complete. Once completed, restart your computer as before and check if the problem is resolved.
Besides corrupted system files, one of the most common causes of SFC errors is when other applications, services, or processes start to interfere with the system document. To bypass them, run an SFC scan in safe mode with the minimum drivers and services required to start. Here's how to do it:
Press Win I
to open Settings. Then scroll down on the right side and click Recovery.
Click Restart Now next to Advanced Startup.
After rebooting into the Windows Recovery Environment (WinRE), clickTroubleshoot.
Then clickAdvanced Options.
ClickStart Settings.
Click Restart.
On the selection screen, press 6 and select Enable Safe Mode with Command Prompt.
After booting into Safe Mode, run the DISM utility as shown before, and then SFC /scannow
run the command at the command prompt.
If the problem persists, proceed to the next few fixes.
WinRE is another environment that can host SFC scans. WinRE runs in a pre-boot environment and consumes minimal resources, so it may scan more efficiently than SFC. Here's how to do it:
Enter the WinRE environment as described above. Or press Start, click the power button, then hold down the Shift
key and click Restart.
After entering WinRE, click "Troubleshooting".
Then Advanced Options.
Select Command Prompt.
Then run the sfc /scannow
command.
Press the Enter key. Then wait for the scan to complete. If the error persists, continue to the next solution.
If the above method does not work, then replacing the damaged files yourself with a good copy is one of the only feasible ways. But before that, you need to pinpoint the corrupted file. Please check the CBS.log file located in the C:\Windows\Logs\CBS folder as mentioned before.
Double-click the cbs.log file to access its contents.
Note the name of the corrupted file and verify the date and time with the last time you ran an SFC scan when the error occurred.
Now, because your own copy of the files is corrupted, you must obtain the files from another computer running the same version of Windows as you. To ensure that all files on the second computer are in good condition, you need to run an SFC scan first.
Next, you need to take ownership of the good files on the second computer. To do this, type the following command in the command prompt:
takeown /f "File_path_and_name"
Replace "File_path_and_name" with the actual file location.
Then press Enter.
Copy this file to a portable drive and plug it into the first computer.
Then, on the first computer, grant the administrator full access to the corrupted system files. Type the following command:
icacls "File_path_and_name" /grant Administrators:F
Replace "File_path_and_name" with the actual file location
and press Enter .
Finally, type the following command to replace the good copy with the corrupted copy:
Copy "Source_file_location" "Destination_file_location"
Replace "Source_file_location" and "Destination_file_location" with the actual locations of the source and destination files. See the example below to understand better.
When prompted, type Yes.
Then press Enter.
Do this for any unrepaired corrupt files logged in the CBS.log file.
Recent updates may also introduce corrupted elements into system files. If you encounter SFC scan errors for the first time after a Windows update, uninstalling these may resolve the issue. Here's how to uninstall the latest Windows updates:
Press Win I
and open Settings. Then click Windows Update in the left pane.
Click Update History.
Scroll down and click Uninstall updates.
Then uninstall the latest updates after which you start getting errors.
When prompted, click "Uninstall " again.
#After uninstalling the update, run an SFC scan again and check if the issue has been resolved.
If undoing Windows Updates has no effect, System Restore is the next best option. This will restore your system to a previous point in time when the system files were not corrupted. Here's how to do it:
Press Start, type restore, and then click Create a restore point.
In the "System Properties" window, click "System Restore".
This will open the System Restore window. You can select the recommended restore and click Next.
Or click to select a different restore point, and then click Next.
Click to show more restore points.
Then select your restore point and click Next.
Finally, clickComplete to start system restore.
Once completed, run the SFC scan command to check if the problem has been resolved. Fix 8: Reset your PCIf all else fails, resetting your PC may be your only option. Resetting your PC doesn't take long and within a few minutes you'll be up and running with all the correct copies of your system files. Here's how to reset your PC: PressWin I and open Settings. Then scroll down on the right side and click
Recovery.
Reset Computer.
ClickKeep My File.
Then follow the on-screen instructions to reset your computer. Once completed, the problem should be gone as all system files have now been replaced. FAQIn this section, we answer several frequently asked questions about SFC scan errors and related queries. What if SFC Scannow cannot repair a damaged file? If the SFC scannow command cannot repair a corrupted file, there are several ways you can seek help. You may want to run DISM and CHKDSK scans, run an SFC scan in safe mode, manually replace corrupted files, or restore/reset your PC. To learn more about repair, see the tutorial above. Why does Windows Resource Protection keep finding corrupt files? If Windows Resource Protection keeps finding corrupt files during SFC scans and is unable to repair them, you may have malware or a virus wreaking havoc on your computer. Another possibility is corruption of critical system files or disk errors. Check out the above tutorial to learn how to repair corruption of system files and disk sectors. How to fix SFC Scannow Windows Resource Protection cannot be executed? The SFC Scannow Windows Resrouce Protection Unable to Execute error message is generated when WRP is unable to replace corrupted system files with any good copies. Since there may be other potential causes of this problem, it's best to use a variety of methods and techniques when solving this problem. See the tutorial above for fixes to apply. The error message "Windows Resource Protection found corrupt files but was unable to repair some of them" does not always cause a system-wide failure, although it may. In addition to using the SFC utility to scan your system files, you can prepare and clear the way for fixing underlying issues. We hope you now know what to do when you receive this error message.The above is the detailed content of How to fix 'Windows Resource Protection found corrupt files but was unable to repair some of them' on Windows 11 or 10. For more information, please follow other related articles on the PHP Chinese website!