How to Repair Corrupt Windows System Files with SFC and DISM Commands

0

The Windows built-in System File Checker tool 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. Here’s how to use it.

When you should run these commands

If Windows experiences a blue screen or other crashes, applications fail, or certain Windows features just aren’t working properly, two system tools can help.

RELATED: Everything you need to know about the blue screen of death

The Windows built-in System File Checker (SFC) tool will 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 does not work, you can also try the Deployment Image Servicing and Management (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. Let’s see how to use them.

RELATED: How to Find (and Repair) Corrupt System Files in Windows

Run SFC command to repair system files

Run the SFC command when troubleshooting a buggy Windows system. SFC works by finding and replacing corrupt, missing, or modified system files. Even if the SFC command does not repair any files, running it will at least confirm that no system files are corrupted and then you can continue to troubleshoot your system with other methods. You can use the SFC command as long as the computer itself boots. If Windows starts normally, you can run it from an administrative command prompt. If Windows does not start normally, you can try starting it in Safe Mode or in the Recovery Environment by booting from your installation media or recovery disc.

RELATED: How to Use Safe Mode to Fix Your Windows PC (And When You Should)

Regardless of how you access the command prompt (normally, in safe mode or in a recovery environment), you will use the command the same way. Remember that if you start Windows normally, you will need to open the command prompt with administrative privileges. To do this, right-click on the Start button and select “Command Prompt (Admin)”.

At the command prompt, type the following command and press Enter to run a full system scan and have SFC attempt repairs:

sfc /scannow

Leave the Command Prompt window open until the command completes, which may take a while. If all is well, you will see the message “Windows Resource Protection did not find any integrity violations”.

RELATED: How to Use Safe Mode to Fix Your Windows PC (And When You Should)

If you see a “Windows Resource Protection found corrupt files but could not repair some” message, try restarting your PC in Safe Mode and running the command again. And if that fails, you can also try booting to your installation media or recovery disc and try the command from there.

Run DISM command to fix SFC issues

You shouldn’t normally have to run the DISM command. However, if the SFC command does not run properly or cannot replace a corrupted file with the correct one, the DISM command (or System Update Readiness Tool in Windows 7) can sometimes repair the Windows system underlying and make SFC run properly.

To run the DISM command in Windows 8 and 10, open a command prompt with administrative privileges. Type the following command and then press Enter to have DISM check your Windows Component Store for corruption and automatically fix any issues it finds.

DISM /Online /Cleanup-Image /RestoreHealth

Let the command complete before closing the Command Prompt window. This may take five to ten minutes. It’s normal for the progress bar to stay at 20% for a while, so don’t worry.

If the DISM command results show that something has changed, restart your PC and then you should be able to run the SFC command successfully.

In Windows 7 and earlier, the DISM command is not 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 a System Restore or System Reset Next

If you are still having system problems and SFC and DISM commands do not help you, you can try more drastic actions.

Running the System Restore tool will restore your Windows operating system files, settings, and applications to an earlier state. This can resolve system corruption issues if the operating system was not also damaged when the restore point was created.

RELATED: How to Use System Restore in Windows 7, 8, and 10

And if all else fails, you can always resort to a system reset or Windows reinstallation. In Windows 8 and 10, you can perform a “Reset this PC” operation to reset Windows to its default state. You’ll have the option to keep your personal files in place, though you’ll have to reinstall programs, or delete everything and do a full reinstall. Whichever you choose, make sure you’ve backed up your PC first! In Windows 7 and earlier, this will require using the recovery partition provided by your computer manufacturer or reinstalling Windows from scratch.


If you encounter any other errors when running any of the commands we’ve covered, try searching the web for the specific errors you’re encountering. The commands will often direct you to log files with more information if it fails. Check the logs for details on specific issues. In the end, it might not be worth fixing serious Windows corruption issues when you can simply reset Windows to its default state or reinstall it. This decision will be up to you.

Image credit: jchapiewsky on Flickr

Share.

Comments are closed.