When Windows or installed programs start causing problems, a system check with SFC and DISM might already be the first step toward a fix.
SFC (System File Checker) and DISM (Deployment Image Servicing and Management) are both built-in command line tools that can check and repair corrupted or missing system files.
⚠️ Important: Both tools must be run in a Command Prompt with Administrator privileges (elevated permissions).
What is SFC?
SFC (System File Checker) scans protected system files for errors and can restore them using clean copies from the Windows component store.
Command:
sfc /scannow
Parameter explanation:
/scannow
– Scans all protected system files and automatically attempts to repair corrupted ones.When to use SFC:
- After a Windows crash or blue screen
- When system features aren’t working properly
- During Windows update issues
- When programs fail to start or throw unexplained errors
What is DISM?
DISM (Deployment Image Servicing and Management) is a more powerful command line tool for system repair. It can help when sfc /scannow
fails to fix the issues.
Common DISM Commands:
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /RestoreHealth
Parameter breakdown:
/Online
– Targets the currently running Windows system/Cleanup-Image
– Performs cleanup and repair tasks on the Windows image/ScanHealth
– Deeply scans the component store for corruption/CheckHealth
– Quickly checks if the image is flagged as corrupted/RestoreHealth
– Scans for issues and attempts to fix them automatically (downloads clean files if needed)
DISM Commands in Detail
Dism /Online /Cleanup-Image /ScanHealth
- Scans for errors in the Windows component store
- Reports issues but does not fix them
- Useful for diagnostic purposes
Dism /Online /Cleanup-Image /CheckHealth
- Performs a quick check to see if any corruption has already been flagged in the system
Dism /Online /Cleanup-Image /RestoreHealth
- Fixes detected issues by downloading clean system files from Windows Update
- Can be used after
sfc /scannow
if it couldn’t repair some files - Also useful after running
/ScanHealth
to repair identified issues