Troubleshooting
How to Repair Windows with SFC and DISM Commands
Fix crashes, broken features and failed updates by repairing corrupted Windows system files with the DISM and SFC commands, step by step.
Published

If Windows features stop working, apps crash or updates keep failing, corrupted system files may be the cause. Windows includes two repair tools: DISM repairs the Windows image, and SFC (System File Checker) uses that image to repair protected system files.
Before you start
- Save your work and close open programs.
- Make sure the PC is connected to the internet. DISM can download clean files from Windows Update.
- You need an administrator account.
- The commands can take 10 to 30 minutes. Do not switch off the PC while they run.
Step 1: Open an administrator terminal
Right-click the Start button and choose Terminal (Admin), or search for Command Prompt, right-click it and choose Run as administrator.
Step 2: Run DISM
Type the following and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
DISM checks the Windows component store and repairs it. The progress bar may appear to stop for a while. This is normal.
Step 3: Run SFC
When DISM has finished, run:
sfc /scannow
SFC scans all protected system files and replaces damaged ones. When it finishes, you will see one of these messages:
- "did not find any integrity violations": system files are fine.
- "found corrupt files and successfully repaired them": restart the PC.
- "found corrupt files but was unable to fix some of them": run DISM again, restart, then run SFC again.
Step 4: Restart and test
Restart the PC and check whether the problem is fixed.
If the problem continues
- Check the drive for errors with chkdsk C: /scan. See [checking drive health](https://htreasure.com/blog/check-ssd-hard-drive-health-windows).
- Use System Restore to return to a restore point from before the problem began.
- Reset this PC (Settings > System > Recovery) to reinstall Windows. You can choose to keep personal files, but back them up first.
- Repair from a USB drive if Windows will not start. See [creating a bootable USB drive](https://htreasure.com/blog/create-bootable-usb-windows-11).
Frequently asked questions
Should I run SFC or DISM first?
Microsoft recommends running DISM first, then SFC, so SFC has a healthy source to repair files from.
Will SFC delete my files?
No. SFC only checks and replaces Windows system files. It does not touch your documents, photos or apps.
Need a hand?
Our [technical support](https://htreasure.com/services/technical-support) team can help with Windows problems that these steps do not fix.