top of page

Repairing Corrupted Windows File System Using SFC and DISM Commands

  • Foto do escritor: André Penatti
    André Penatti
  • 13 de jan. de 2022
  • 4 min de leitura

Repairing Corrupted Windows File System Using SFC and DISM Commands


Windows built-in file scanning tool has the function of searching and fixing corruptions in your files. If a file has been modified, it will automatically replace that file with the correct version. Learn ahead how to properly perform the repair of these files to fix anomalies that Windows is causing.


When to run these commands


If Windows is experiencing glitches such as blue screens, applications are crashing, or some Windows features are not working properly, there are two system tools that can help.

The built-in Windows File Scanning Tool (SFC) will check Windows system files for inconsistencies for corruption or any other changes. If a file has been modified, it will automatically replace that file with the correct version. In addition to the SFC command, you can also use the DISM (Deployment Image Servicing and Management) command in Windows 10 or Windows 8 to repair the underlying Windows system image. In Windows 7 and earlier, Microsoft offers a “System Update Readiness Tool” for download. Let's take a look at how to use them.


Running SFC command to repair system files


Run the SFC command to troubleshoot a Windows system with inconsistencies in its settings. SFC works by finding and replacing system files that are corrupted, missing, or changed. Even if the SFC command does not repair any files, running it will at least confirm that no system files are corrupt and then you can continue to troubleshoot the system with other methods. It is a command for local use, and must be executed on the computer to be analyzed. If Windows starts normally, it can be run from an administrative command prompt. If Windows does not start normally, try starting it in Safe Mode or the recovery environment by booting from an installation media or recovery disc.

However, if you access the Command Prompt – typically Safe Mode or the recovery environment – ​​you will use the command in the same way. Just remember that if you start Windows normally, you will need to open Command Prompt with administrative privileges. To do this, right-click 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 make repairs on the SFC attempt



sfc /scannow







Leave the Command Prompt window open until the command completes, which may take some time. If everything is ok, the message “Windows Resource Protection did not find any integrity violations” appears.

If you see a message “Windows Resource Protection found corrupt files but was unable to fix some of them”, try restarting your PC in Safe Mode and running the command again. And if that fails, you can also try booting with your installation media or rescue disk, running the command from there, in this case after selecting the installation language just press shift+F10 simultaneously to bring up a command prompt window, by him running SFC.


Run DISM command to fix SFC issues


It is normally not necessary to run the DISM command. However, if the SFC command does not run correctly or cannot replace a corrupt file with the correct one, the DISM command – or System Update Readiness Tool in Windows 7 – can sometimes fix the underlying Windows system and make SFC run correctly.

To run the DISM command on Windows 8 and 10, open a Command Prompt with administrative privileges. Type the following command and press Enter to have DISM check the Windows component store for corruption and automatically fix any problems it finds.


DISM /Online /Cleanup-Image /RestoreHealth


Allow the command to finish executing before closing the command prompt window, this process may take a while. It's normal for the progress bar to stay at 20% for a while, so don't worry about it.



If the results of the DISM command indicate that something has changed, restart your PC and 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 Microsoft's System Update Readiness Tool and use it to scan your system for problems and try to fix them.


Try a system restore or system reset


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

Running the System Restore tool will restore Windows operating system files, settings and applications to a previous state. This can fix system corruption issues if the operating system was also not damaged at the previous point when the restore point was created.

If all else fails, you can always resort to a system reset or a reinstall of Windows. 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 – although you'll have to reinstall programs – or remove everything and do a complete reinstall. Whichever you choose, make sure you've backed up your files first! On Windows 7 and earlier, this will require using the recovery partition provided by your computer manufacturer or reinstalling Windows from scratch.



If you encounter other errors while running any of the commands discussed, try searching the web for the specific errors you find. The commands often point to log files with more information if they fail – check the logs for more details on specific issues. Ultimately, it may not be worth it to troubleshoot serious Windows corruption issues when you can simply reset Windows to its default state or reinstall it.


Final considerations:


Windows since its beginnings, when it definitively established its leadership as an operating system in the world of computers, has gradually incorporated several tools that allow you to carry out some checks and repairs on your system to reduce or eliminate some of the problems arising from incorrect installations of programs, errors in your settings or even by your own updates.

Many of them are not visible on the desktop or even in the initial settings, for this reason it is important, supported by the internet, to search for hidden resources in its settings, even though most of it is aimed at the command prompt and there is a little more knowledge, it is not uncommon when searching around to find application examples to serve as an application guide for anyone looking for help.

 
 
 
bottom of page