Open Command Prompt as administrator and run DISM /Online /Cleanup-Image /RestoreHealth, wait for 100%, then run sfc /scannow and restart. Run SFC a second time if it reported repairs. If DISM can't find source files, point it at a mounted Windows ISO.

The short explanation

SFC (System File Checker) scans protected Windows files and replaces incorrect versions with good copies from the component store (C:\Windows\WinSxS). DISM (Deployment Image Servicing and Management) repairs that component store itself, downloading clean files from Windows Update if needed.

That’s why the order matters: if the store is damaged, SFC repairs files with bad copies or reports it can’t fix them. Running DISM first gives SFC a healthy source. Both tools are safe and don’t touch personal files or installed apps.

What you'll see

  • You've been told to run SFC or DISM to fix crashes, update errors or broken Windows features.
  • SFC says “Windows Resource Protection found corrupt files but was unable to fix some of them”.
  • DISM stops with “The source files could not be found” (0x800F081F).

Why it happens

  • System files damaged by failed updates, sudden power loss or disk errors.
  • Component store corruption that blocks updates (0x80073712, 0x800F081F).
  • Malware or third-party tools that replaced system files.

How to fix it

  1. Open an elevated Command PromptPress Win, type cmd, right-click Command Prompt → Run as administrator (or use Terminal (Admin)).
  2. Run DISM RestoreHealthType DISM /Online /Cleanup-Image /RestoreHealth. It may pause at 20% or 62% for several minutes. That's normal. Wait for “The restore operation completed successfully”.
  3. Run SFCType sfc /scannow and wait for 100%. Results: did not find any integrity violations (all good), found corrupt files and successfully repaired them (restart), or unable to fix some (see the next step).
  4. If SFC can't fix everythingRestart and run sfc /scannow again. If it still fails, check details in C:\Windows\Logs\CBS\CBS.log and run DISM again.
  5. If DISM can't find source filesMount a Windows ISO of the same version and run DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess (D: = ISO drive). If the ISO has install.esd instead, try esd: in place of wim:; if DISM still can't use it, convert the ESD to a WIM first.
  6. Run from recovery if Windows won't startIn Windows Recovery → Command Prompt, use sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows. Check the drive letter with dir C:\ first, as it can differ in recovery.

Command

DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Elevated Command Prompt or Terminal (Admin). Restart when both finish. Neither command deletes personal files.

How to confirm the fix: A second sfc /scannow reports “Windows Resource Protection did not find any integrity violations”.

DISM options explained

CommandWhat it doesChanges anything?
DISM /Online /Cleanup-Image /CheckHealthQuick check of whether corruption has been flaggedNo
DISM /Online /Cleanup-Image /ScanHealthFull scan of the component store (several minutes)No
DISM /Online /Cleanup-Image /RestoreHealthScans and repairs the component storeYes, repairs
DISM /Online /Cleanup-Image /StartComponentCleanupRemoves superseded update files to free spaceYes, cleanup

Stop it happening again

Avoid hard power-offs during updates, keep the system drive healthy, and avoid tools that replace Windows files.