How to Scan and Fix Corrupted Windows Files

How to Scan and Fix Corrupted Windows Files

If your Windows system is acting weird or is unbearably slow, the first thing you need to do is scan and remove any viruses or malware. Apart from that, the other reason might be the corrupted system files. There are a variety of reasons why system files get corrupted, like a sudden power failure, system crash, errors while updating, version mismatch, etc. No matter what the reason is, if you ever think your system is slow or the system files hvee been corrupted, here is how you can scan and fix corrupted Windows files using the DISM (Deployment Image Servicing and Management) command line tool.

Note: I’m using Windows PowerShell to scan and fix the problems. However, you can also use the Command Prompt with the same exact commands and procedures discussed below.

To start, search for PowerShell in the Start menu. Right-click on it, and then select the option “Run as administrator.” This action will open the Windows PowerShell.

win10-fix-corrupted-system-files-open-powershell

In the PowerShell window copy and paste the below command. This command invokes the Windows Resource Protection to check for any file corruptions or violations. The scan may take some time to complete, so sit back and wait for the results.

Once the scan is completed, it will display a message something like what is show below if there are any problems. Windows tries to fix them by itself, but more often than not it fails to do so. Continue on to the next step.

win10-fix-corrupted-system-files-sfc-unable-to-fix

If the SFC command didn’t fix the problem, then we can use the DISM tool with RestoreHealth and Source switches. To start, copy the below command, and execute it in the PowerShell.

As soon as you execute the command, Windows starts the process of fixing it. While fixing it, the progress bar may get stuck at 20%. This is normal. Just wait for a while for the process to continue. If the command fixes the problem then that’s good. If not, continue on. In my case Windows failed to fix the problem. If you want to know what the actual error is, open the DISM log from the location displayed in the Powershell.

win10-fix-corrupted-system-files-dism-failed-to-fix

Now, we are going to use the /Source switch where we point the DISM tool toward the Windows installation media so that it can fix the problem using the source files. Insert your installation media, be it a DVD or USB driver. If you don’t have the installation drive, download the latest Windows ISO from Microsoft and mount it (right-click on ISO and select the option “Mount”).

Once you’ve done that, execute any one of the below commands. Don’t forget to replace “X” with the actual drive letter of your Windows installation media.

or

The second command prevents DISM from using Windows Update for online images. If everything goes well, you will see a message reading “restoration operation completed.” Just like before, it may take some time to complete the procedure.

win10-fix-corrupted-system-files-source-switch-complete

Now, again use the SFC command so that Windows can fix any minor problems.

When the procedure has been completed, you will see a message like the one below.

win10-fix-corrupted-system-files-sfc-repair-complete

If you scan again with the sfc command, you should see a message like the one below. This confirms that there are no more file corruptions or violations.

win10-fix-corrupted-system-files-no-file-violations

Do comment below sharing your thoughts and experiences about using the above methods to scan and fix corrupted system files in Windows.

7 comments

  1. A question: Wouldn’t it be faster and easier to reinstall Windows (assuming you are using Windows 10)? I know you have a good reason for everything you recommend; I read most of your articles. I’m just wondering about the benefits of going this route? Thank you!

    • @Karen M-
      In some cases it would be faster to reinstall the OS, however going this route might mean that you have to also reinstall all of the drivers, software, and updates so if you don’t want to do all of that using the DISM and SFC commands will save you time. These 2 commands will work with other versions of windows also. So to answer your question. The benefits would include simplicity, time and effort to get windows back up and running right.

  2. I must’ve lucked out, “sfc /scannow” worked and did repair all corrupted files – don’t know how many.
    Oh, and THANK YOU!

  3. I will try this. Went from Windows 8.1 to Windows 10. I have a Lenovo machine that is fairly new. Windows 10 bricked my machine for 3 days. I couldn’t revive it no matter what I did. Then on the 4th day I came to the computer with the log-in screen up. Since then it’s been doing flakey things. The Windows APP store doesn’t work, printer flaked out for a week then came back. Ran antivirus on it and went on-line and spoke with a live Microsoft person who led me to reinstalling the operating system without loosing my data. Next morning I came to it and had a dialogue box that said installation failed . . . . but it still works . . sort of. I’ll try this to see if there are any corrupt files and report back.

    • @Steve Green- If the 2 commands mentioned fix the computer but not the store try running wsreset.exe from either the command line or the run window. To get the run window hit the windows key + r on the keyboard. This attempts to reset the cache associated with the store. Report back if that gives you an error and I can give some other tips to fix. As far as other items not working you may need to update your drivers. Lenovo is really easy to do this. Go to your control panel, change the view to either large or small icons and open Lenovo updates and drivers. Once it is open you will have 3 tabs. Go thru the tabs and select anything that states that it is a driver, chipset, or BIOS update. If you don’t have the Lenovo updates and driver utility, go to google and search for it and it will take you to the lenovo site where it can then be installed. Let me know if that helps.

  4. @Steve Green- If the 2 commands mentioned fix the computer but not the store try running wsreset.exe from either the command line or the run window. To get the run window hit the windows key + r on the keyboard. This attempts to reset the cache associated with the store. Report back if that gives you an error and I can give some other tips to fix. As far as other items not working you may need to update your drivers. Lenovo is really easy to do this. Go to your control panel, change the view to either large or small icons and open Lenovo updates and drivers. Once it is open you will have 3 tabs. Go thru the tabs and select anything that states that it is a driver, chipset, or BIOS update. If you don’t have the Lenovo updates and driver utility, go to google and search for it and it will take you to the lenovo site where it can then be installed. Let me know if that helps.

Comments are closed.

Sponsored Stories