How to Repair Corrupted Windows System Files with the SFC and DISM Commands

The System File Checker tool built into Windows can scan your WIndows system files for corruption or any other changes. If a file has been modified, it will automatically replace that file with the correct version.

If the SFC command doesn’t work, you can use the DISM command on WIndows 10 or Windows 8 to repair the underlying Windows system image. On Windows 7 and earlier, Microsoft offers a downloadable “System Update Readiness Tool” instead.

When You Should Run These Commands

Run this command when troubleshooting a buggy Windows system. If Windows is blue-screening, applications are crashing, or some Windows features just aren’t working properly, the SFC command may be able to fix this. Even if the SFC command doesn’t repair any files, running it will confirm that no system files are corrupted and you can continue to troubleshoot your system with other methods.

You shouldn’t normally have to run the DISM command. However, if the SFC command fails to run properly or can’t replace a corrupted file with the correct one, the DISM command or System Update Readiness Tool can fix the underlying Windows system and make SFC run correctly.

Run the SFC Command to Repair System Files

You’ll need to do this from and Administrator Command Prompt window. To open one on Windows 10 or 8.1, right-click the Start button and select “Command Prompt (Admin)”. On all versions of Windows, you can also search the Start menu for Command Prompt, right-click it, and select Run as Administrator.

Type the following command into the Command Prompt window and press Enter to run a full system scan:

sfc /scannow

Leave the Command Prompt window open until the command completes — this may take some time. If everything is fine, you’ll see the message “Windows Resource Protection did not find any integrity violations.”


How to Use Safe Mode to Fix Your Windows PC (and When You Should)
Windows’ Safe Mode is an essential tool. On computers infected with malware or crashing because of buggy drivers, Safe Mode… [Read Article]

If you see a “Windows Resource Protection found corrupt files but was unable to fix some of them” message, try rebooting into Safe Mode first. On WIndows 10, 8.1, or 8, hold the Shift key while clicking the Restart option toaccess the advanced boot options menu. On Windows 7 or earlier, reboot your computer, and then press and hold the F8 key while it’s booting up. Run the sfc /scannow command from within Safe Mode.

Run the DISM Command to Fix SFC Problems

On WIndows 10, 8.1, and 8, the Deployment Image & Servicing Management tool can fix component store corruption that prevents the SFC command from working properly.

To run this command, open a Command Prompt as administrator. Type the following command and press Enter. DISM will check your Windows component store for corruption and automatically fix any problems it finds.

DISM /Online /Cleanup-Image /RestoreHealth

Allow the command to finish running before closing the Command Prompt window. This may take five to ten minutes. It’s normal for the progress bar to stay at 20 percent for a while, so don’t worry about that.

If the DISM command changed anything, restart your computer afterwards. You can now run the SFC command again and it would be able to replace any corrupted files with the correct ones.

On Windows 7 and earlier, the DISM command isn’t available. Instead, you can download and run the “System Update Readiness Tool” from Microsoft and use it to scan your system for problems and attempt to fix them.

Try System Restore or a System Reset

If you’re still experiencing system problems and these tools can’t help, you can try more drastic actions. Running the System Restore tool will restore your Windows operating system files to an earlier state, and this may fix system corruption problems if the operating system wasn’t damaged at that earlier point.

There’s always just performing a system reset or reinstalling Windows, too. On Windows 10, 8.1, and 8, you can perform a “Reset this PC” operation to reset WIndows to its default state. You’ll have to reinstall your programs after, but you won’t lose any personal files. On Windows 7 and earlier, this will require using your computer’s manufacturer-provided recovery partition or reinstalling Windows from scratch.

If you encounter other errors while running the above commands, try searching the web for the errors you encounter. The commands will often point you to log files with more information if they fail, too — check the log files for more details about specific problems. Ultimately, it may not be worth troubleshooting serious Windows corruption problems when you can just reset Windows to its default state or reinstall it.

The above commands also have other options, too. For example, you can have the SFC command check only a single Windows file for corruption and repair it. You can have the DISM command perform a quick check for system corruption without repairing it, or provide a WIM or ESD file containing Windows operating system files.