Is your Windows crashing, freezing, or showing Blue Screen of Death (BSOD) errors? Before you reinstall Windows entirely, you should try to repair the system files using built-in command-line tools.
Windows has two powerful tools for this: SFC (System File Checker) and DISM (Deployment Image Servicing and Management).
—
When to use this?
- Windows functions are not opening.
- Strange error messages pop up randomly.
- Windows Update is stuck.
- The system feels sluggish or buggy.
Step 1: Open Command Prompt as Administrator
These commands require elevated privileges.
- Type
cmd in the Start menu.
- Right-click Command Prompt > Run as Administrator.
Step 2: Run the DISM Tool First
Many guides tell you to run SFC first, but that is incorrect. You should run DISM first to ensure your local Windows “image” (the backup source) is healthy. If the source is corrupted, SFC cannot fix anything.
Run this command and wait (it may take 10-20 minutes):
DISM /Online /Cleanup-Image /RestoreHealth
Note: It is normal for the progress bar to get stuck at 20% or 40% for a while.
Step 3: Run the System File Checker (SFC)
Once DISM is finished, run the main repair tool. This scans all protected system files and replaces corrupted files with a cached copy.
DOS
sfc /scannow
Step 4: Analyze the Results
After the scan finishes, you will see one of these messages:
"Windows Resource Protection did not find any integrity violations."
Good news! Your system files are fine. Your issue might be driver-related.
"Windows Resource Protection found corrupt files and successfully repaired them."
Success! Restart your computer and see if the issue is resolved.
"Windows Resource Protection found corrupt files but was unable to fix some of them."
This indicates deeper OS damage. You may need to reset Windows.
Conclusion
Running DISM followed by sfc /scannow is the standard "first aid" for any Windows software issue. It is completely safe to run and will not delete your personal files.