Corrupted system files can cause Windows to behave unpredictably, crash, or refuse to start. Microsoft includes two powerful tools built right into Windows - SFC and DISM - that can fix most types of file corruption without needing to reinstall your operating system. If your PC feels unstable or produces mysterious errors, running these utilities is an effective troubleshooting step.
Understanding SFC and DISM Utilities
SFC (System File Checker) and DISM (Deployment Imaging Service and Management Tool) are command-line utilities designed to repair missing or damaged Windows system files. SFC scans the integrity of all protected files and replaces incorrect versions with official Microsoft copies. DISM, on the other hand, focuses on repairing the underlying Windows image itself, which SFC relies on to function correctly.
Both tools are safe to use and come pre-installed on Windows 10 and 11, as well as older versions like Windows 8 and 7. If you experience file corruption, blue screen errors, or random system glitches, these utilities should be among the first remedies you try before considering more drastic measures.
When Should You Use SFC and DISM?
Use SFC if you notice symptoms like missing features, frequent crashes, error messages referring to DLLs, or unexplained system slowdowns. SFC is straightforward and does not require an internet connection. It's a good first step for most common issues tied to corrupted files.
Run DISM if SFC finds corruption but cannot fix it, or if Windows Update problems persist. DISM repairs the component store from which SFC pulls clean files, so fixing this first gives SFC a better chance of succeeding. Use DISM if you suspect deeper system corruption or update failures, especially after major Windows upgrades or power failures that interrupt critical updates.
How To Run SFC (System File Checker)
To use SFC, open the Command Prompt as an administrator. The easiest way is to press Windows + S, type cmd, then right-click 'Command Prompt' and choose 'Run as administrator'.
- In the console, type: sfc /scannow and press Enter.
- The scan can take 10 to 30 minutes, depending on your system speed and the number of files.
- Do not close the window or restart your PC during the scan.
Once finished, SFC will display a summary. "Windows Resource Protection did not find any integrity violations" means your files are intact. If it says it found and repaired corruption, reboot your PC and see if the problem is resolved. If it says "could not fix some of them," try running SFC again, or move on to DISM.
How To Run DISM (Deployment Imaging Service and Management Tool)
DISM provides more advanced repair options. To use it, again open Command Prompt as administrator. There are three main DISM commands, but the most commonly recommended for repair is:
- DISM /Online /Cleanup-Image /RestoreHealth
This command scans and automatically repairs corruption in the system image. It may need internet access to download replacement files from Windows Update. The process can take 10 to 30 minutes or longer, especially on older or heavily used systems.
If DISM reports errors about being unable to find sources, you may need to specify a local Windows image file or USB/DVD as a source. For most users, the basic command above is all that is required.
The Right Order: DISM Before SFC or Vice Versa?
On most systems, start with SFC. If SFC completes and repairs all issues, you're done. But if SFC can't fix errors, run DISM to repair the underlying Windows image, then run SFC again. This two-step approach ensures the system file checker has a healthy source to pull from.
Some technicians recommend running DISM first if you strongly suspect deep corruption, especially after failed Windows updates or upgrades. In practice, it is safe to run these tools as many times as needed, and there is no harm in running both to ensure system integrity.
Common Issues and How To Interpret the Results
After running SFC, you may see several messages:
- No integrity violations - No problems found.
- Found corrupt files and repaired them - Files were fixed. Restart your PC.
- Found corrupt files but could not repair some - Try running SFC again. If the message repeats, move on to DISM.
DISM may output messages like "The restore operation completed successfully" or "The source files could not be found." In the latter case, you may need to provide the Windows installation media or an ISO as a source, using the /Source option. Most users do not need to do this, but if you do, mount your Windows ISO and use a command like DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim (replace D: with your actual drive letter). After DISM completes, always reboot and consider running SFC again.
What To Do If Repairs Fail
If both SFC and DISM fail to repair your system, you have a few options left. First, try booting into Windows Safe Mode and running the tools again. Sometimes, interference from drivers or third-party software can block repairs in normal mode.
If system files remain corrupted, use System Restore to revert to a working state, if you have restore points enabled. As a last resort, you can perform an in-place repair install of Windows, which preserves your files and programs but replaces all system files. Download the latest Windows ISO from Microsoft, start the setup, and choose 'Upgrade this PC now' to run the repair install. Hardware issues like failing hard drives can also cause file corruption, so check your disk health if problems persist.
Frequently asked questions
Will running DISM or SFC delete my files or programs?
No, both tools focus on repairing system files only. They do not touch your personal data, documents, or installed programs.
How long do SFC and DISM scans take?
SFC usually takes 10-30 minutes. DISM can run for 20-40 minutes or longer, depending on system health and speed.
Do I need an internet connection for DISM?
Often, yes. DISM may need to download replacement files from Windows Update. If you do not have internet, you can specify a local source, such as a Windows installation ISO.
Can I use my PC while SFC or DISM is running?
It's best not to. Let the scans finish without interruption to avoid additional problems or incomplete repairs.