How To Repair Corrupted Windows Files (2024)

Corrupt system files are the reason for a whole host of problems, some of which you may be familiar with, including the infamous blue screen error or BSOD, Windows Update errors, Windows Explorer Using High CPU error, and so on.

The best way to repair corrupted Windows Files is using native system repair utilities such as SFC (System File Checker) and DISM (Deployment Image Servicing and Management). CHKDSK can also be helpful if the file corruption happened due to bad sectors on your drive.

For further troubleshooting, you can try the other methods listed below.

Run DISM and SFC Scans

The sfc command scans all protected system files, verifies their versions, and replaces them with the correct version if required. In case any of the source files for SFC are corrupt/missing, DISM will replace them with functioning ones. DISM will also be helpful if there are any errors that the SFC utility finds but is unable to fix. To perform these scans:

  • Press Windows + R to launch Run.
  • Type cmd and press CTRL + Shift + Enter to launch Elevated Command Prompt.
  • Type DISM.exe /Online /Cleanup-image /Restorehealth and press Enter.


dism-online-cleanupimage-restorehealth

  • After a few minutes, the process will complete and a log file will be created at %windir%/Logs/CBS/CBS.log

DISM uses Windows Update to obtain the files required to fix the corruption. To use a different repair source like a Windows DVD for instance:

  • Type the following code, replace C:\RepairSource\install.wim with the appropriate repair source path, and press Enter:
    DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\install.wim /LimitAccess
  • Type sfc /scannow and press Enter.


sfc-scannow-no-violations

You’ll receive a message upon completion. If it says no integrity violations or successful repair, you don’t need to take any further actions.

sfc-corrupt-files-successfully-repaired

  • Check the sections below in case of other messages.

Windows Resource Protection could not perform the requested operation

We have a detailed guide instructing what to do in case of this error. With that said, here are the steps to run the SFC scan in Safe Mode to overcome this error:

See also  What Computer Do I Have? How to Check Specs & Model

Hold Shift and restart your PC or, reboot it 3 times consecutively to access winRE.

From the Choose an Option screen, select 
Troubleshoot > Advanced options > Startup Settings > Restart.

After restarting, press 5 or F5 to boot in safe mode with networking.

Safe-mode

Upon booting in safe mode, repeat the same steps as the section above. The DISM and SFC scans should fix the issue now. In case they still don’t, check the section below.

Windows Resource Protection found corrupt files but was unable to fix some of them

For this error, you’ll have to replace the corrupted files manually with the steps listed below:

Open Elevated Command Prompt, type the following command, and press Enter:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

Open the sfcdetails.txt file that was created just now from your Desktop.


sfcdetails-txt

Identify the file that couldn’t be repaired using the DateTime, and Cannot Repair Member File message.

We’ll assume the corrupt file is jscript.dll for tutorial purposes. Replace filename_and_path with your own values and use the following commands:

takeown /f filename_and_path


takeown-cmd

icacls filename_and_path /Grant Administrators:F


icacls-grant-administrators-cmd

Finally, copy-paste and replace the corrupt file with a working one. To do it via cmd, use the command below but replace the first portion with the good file’s location and the second portion with the corrupt file’s path:

 copy F:\new\jscript.dll C:\windows\system32\jscript.dll

You can obtain a working version of the corrupt file online, or from another computer running the same version of Windows as yours.

Use the CHKDSK Utility

CHKDSK checks the integrity of the file system and attempts to fix any logical file system errors and bad sectors. You can use it with the steps listed below:

Press Windows + R to launch Run.

Type cmd and press CTRL + Shift + Enter to launch Elevated Command Prompt.

Type the following command, replace Z with the appropriate drive letter, and press Enter: CHKDSK Z: /f /r /x


run-chkdsk-for-0x80070057-1

You can also scan a partition for errors via GUI using the Error Checking tool. To initiate it:

See also  Tiny11: The lightweight version of Windows 11 becomes even smaller thanks to an update

Press Windows + E to open Windows Explorer.

Right-click the drive you want to scan and select Properties.

Switch to the Tools tab and click on Check.


error-checking-scanner

Press Scan drive and follow the on-screen instructions to fix any errors found.

Note: Make sure to run the SFC scan again if CHKDSK found any corruptions on the disk.

Note: Make sure to run the SFC scan again if CHKDSK found any corruptions on the disk.

Run a Troubleshooter

If you’re only facing issues with a particular part of Windows like Windows Update or Internet Connection, for instance, you can run a troubleshooter for that issue specifically with the following steps:

Press Windows + I to launch Settings.

Navigate to Update and Security > Troubleshoot and click on Additional troubleshooter.


windows-additional-troubleshooters

Run the appropriate troubleshooter for your particular issue.

Third-Party Software

In case none of the solutions above were helpful, or you simply didn’t want to deal with all the hassle of the technical steps, a third-party repair tool is a good option. Some reputable ones available right now include FixWin 10, Restoro, Windows Repair, Windows Repair Toolbox, Recoverit, and CCleaner.

System Restore / System Image Recovery

This solution is only applicable if you have a system restore point or system image from before the start of the corruption issue.

Keep in mind that system restore will only reset the system files, configurations, and programs; it won’t affect your personal files. On the other hand, system image recovery will revert everything, including personal files to the state they were when the image was created.

With that said, here’s how you can use system restore or system image recovery:

Press Windows + I to launch Settings.

Navigate to Update and Security > Recovery.

Under Advanced Startup, click on Restart now.

In winRE, click on System Restore.


system-restore-1

Select the appropriate Restore point from the list and follow the on-screen instructions to complete the process.


restore-point-sample

Alternatively, select System Image Recovery, select the appropriate image, and follow the instructions shown on-screen.

See also  How to Install Linux Terminal on Windows


system-restore-system-image-recovery

Startup Repair / Repair PC

Corrupt Windows Files can lead to booting issues, in which case, you should use the startup repair tool with the following steps:

Reboot your PC 3 times in a row to access Windows Recovery Environment (winRE).

In winRE, go to Troubleshoot > Advanced Options > Startup Repair.


startup-repair-tool-automatic-repair

Login to your account and wait for the startup repair tool to complete the repair process.

If your system files are so corrupt that you can’t even access the startup repair tool at boot, you can boot using a Windows Installation Disk/Drive or Recovery Disk/Drive and access the repair tool from there.

repair-your-computer

Reset your PC

If none of the other solutions worked, the only option left is to perform a clean install or reinstall of Windows. In Windows 10/11, you can opt to keep your personal files or format everything during the installation.

reset-pc-keep-my-files
  1. Press Windows + I to launch Settings.
  2. Navigate to Update and Security > Recovery and click on the Reset PC or Get Started button.
  3. Follow the on-screen instructions and press Reset to reset your PC.

How to Prevent Corruption in System Files?

Regularly backing up important files – both system and personal – is the first thing you should do to protect files against corruption and other threats.

Other good practices include keeping your system updated, scanning for malware regularly using antivirus software, and performing the occasional CHKDSK scan.

On the hardware end, abrupt shutdowns, power outages, and surges can damage your hard drive, which can lead to file corruption. Using a UPS for power backup, and shutting down your Windows properly can be helpful against these problems.

Did you like this article? Do not hesitate to share it on social networks and subscribe to Tech To Geek on Google News to not miss any articles!
5/5 - (1 vote)
"Because of the Google update, I, like many other blogs, lost a lot of traffic."

Join the Newsletter

Please, subscribe to get our latest content by email.

Mohamed SAKHRI

I am Mohamed SAKHRI, the creator and editor-in-chief of Tech To Geek, where I've demonstrated my passion for technology through extensive blogging. My expertise spans various operating systems, including Windows, Linux, macOS, and Android, with a focus on providing practical and valuable guides. Additionally, I delve into WordPress-related subjects. You can find more about me on my Linkedin!, Twitter!, Reddit Facebook

Leave a Comment