How Do I Fix a Corrupted Windows System File Using its Healthy Version?

8 minutes read

Windows has several built-in tools to check and repair the system files on Windows, you’ll need basic computer knowledge to get your system. Read this article to learn how to fix system files easily.

Written By
Updated On

If you are experiencing issues in your Windows and can’t figure out the root of the problem if your Windows is showing errors constantly if your operating system is unable to operate desirably and crashes usually, it can be classified as one of the most common occurrences which arise due to ‘system file corruption’.

You can check the event viewer in order to get a general idea about the issues your system is facing such as ‘file system corruption’ error or hard drive error, but these are useful if your computer does not crash, if the computer crashes constantly and blue screen appears which is generally termed as ‘Blue Screen of death’ error, it's due to the corruption in system files or indicates missing system files.

Often, there are times for Windows users find themselves trapped in fixing or understanding a system anomaly. It gets more disturbing if the fault has occurred from within the Windows file system itself, it creates several difficulties like crashes and dysfunctional Windows functionality. System files in Windows are exposed to a number of conditions where they are vulnerable and are under a constant threat of corruption and/or deletion; the reason may vary from an improper update of the Operating system to deleting files or modification due to malware in the system.

Note: At times, a corrupt system file might also result in corrupting the Recycle Bin. If your Windows Bin folder has gotten corrupt. Then follow this article to fix the corrupted Recycle Bin.

Here are a few things you should try for the smooth functioning of your windows in case your system files are corrupted or dysfunctional due to above mentioned or any other reasons;

Using SFC Command (System file checker)

This tool is provided by Windows to check for corrupt or missing system files in Windows and help restore them. This is a utility that performs the system file restoration automatically.

Using the SFC.exe tool: This tool is accessible using the command prompt window. Windows 11, 10, 8 – Go to Start > Search ‘cmd’ or ‘command prompt’ > Run as Administrator.

open command prompt as administrator

Now type in sfc /scannow

type the sfc command

The command prompt will run the system file checker tool and will check and try to fix all the system file errors.

For all the corrupt or deleted files in the system, the system file checker will replace files with the corresponding copies from the cached copies saved in system32/dllcache.

However, during the execution of Windows resource protection files, the outcome may be the below-mentioned responses:

  • Did not find any Violation – It states that there is no corrupt or missing file present in the system.
  • Successfully repaired corrupt files – Details of the successful restoration are logged in CBS.Log – This response suggests the successful restoration of corrupt files in the windows and details can be looked up in %Windir%\logs\CBS\CBS.log.
  • Found corrupt files but unable to repair – This suggests the presence of corrupt files in the Windows and Windows resource protection was unable to repair them, the details can be found in the CBS.log for further analysis.
  • Could not perform the requested operation – This suggests that the System file checker is unable to execute the requested query and there are no details of the missing or corrupt file system.
  • The system file checker could not run/ not work – This suggests the need to perform a ‘manual restoration’ of system files.

Using DISM Command

Just like the SF command DISM can also repair and fix the Windows system files:

  • Open command prompt as Administrator
  • Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
use dism-command

The process will take 10-15 minutes to complete the process and after the process is completed you can restart the computer.

Repair Corrupt System Files Manually

If the response from the system file checker is negative and you are unable to repair the corrupt system files, a manual restoration of such files is required, but in order to do that, we have to look out for the details from the system file checker.

The details from the system file checker can be obtained using the CBS.log file; to call for the file log file in the command prompt follow the steps mentioned below:

  • Copy the CBS log file content to the Sfcdetails.txt file on the desktop of your window using “findstr” command and view the details using sfcdetails.txt saved on your desktop.
  • Open the Windows PowerShell and type in ; findstr /c:“%windir% ”Logs\CBS\CBS.log >%user1%\E:\sfcdetails.txt

This will contain the details from all the operations when the system file checker has been executed. The detailed log can be viewed using the sfcdetail.txt file.

  • The detailed report can be viewed from the respective text file that you have saved from the command prompt which contains information in the form; Date/Time SFC details.
  • As the corrupt files are recognized from the log SFC details, you can next try to find the corresponding files that are healthy in nature from either the cached data folder or some other computer or system files from some other source and save the same on the desktop (or elsewhere).
  • Take administrator ownership of the corrupt file by using the command prompt through the takeown/f file path and grant the administrator full access to process the corrupt file using icacls file path/grant administrators:f

Replace the corrupted-file-location-and-file-name with the actual location of the file.

gain complete administrative access
  • Now you'll have to replace the corrupt system file with a good copy of a file.
  • Type copy C:\location-of-healthy-file C:\corrupted-file-location-and-file-name command and click on Enter
use copy command
  • Click on YES if you are asked to overwrite the files.
  • Repeat the steps for all your corrupted files and after all the files are replaced you can verify using sfc /verifyonly command.

Use System Restore

This method will work only if you have enabled system restore previously on your computer.

  • Search for Create a restore point and open it.
open create a restore point
  • Click on System Restore.
click on System Restore
  • You can select a different restore point and click on Next to select the previously created one.
select choose a different restore point
  • Select the desired restore point from the options and click on Next.
  • Once the process is completed, system files will be restored to the previous healthy version.

Some of The Common Troubleshooting Methods While Experiencing the Corrupt System File Error Issue.

  • Use Windows Update troubleshooter if your PC is unable to apply updates, or offers them repeatedly.
  • The failure of Automatic Repair or unavailability of Safe Mode suggests errors or missing files on the hard disk of your computer which prevents Windows startup. Bootable Recovery options like Drive/System Repair Disc or (CD/DVD Drive) can be helpful in such cases.
  • Backup and restore functions are also available in some of the versions of Windows.
  • Refresh, Reset the computer or restoring a system image are also adopted in various scenarios.

Note: All the above-listed troubleshooting methods may lead to the loss of your personal data and change in the system functionality, if you are resilient enough to stick to your current settings and file system, here's software for repairing corrupted files manually by following the instructions provided.

About the Author: John Harris

With a decade of experience in data recovery, John Harris, Senior Editor at Remo Software, is your go-to specialist. His focus includes partition management, Windows solutions, and data troubleshooting, delivering insightful content that serves both users and search engines. John's expertise shines through in illuminating blog posts, untangling data loss intricacies across diverse storage platforms.…