Windows 10’s System File Check and Deployment Image Servicing and Management
Running SFC and DISM seems to be everyone’s go-to suggestion for cumulative update installation problems. It works only a small fraction of the time, but when it does, you come back from the brink of disaster with few scars to show for it.
System File Check, better known as sfc, is a Windows 10 program that scans system files, looking to see if any of them are corrupt. There are ways to run sfc — with switches — to tell sfc to replace bad versions of system files.
If sfc can’t fix it, a second utility called Deployment Image Servicing and Management (DISM) digs even deeper. Microsoft recommends that you run both, in order, regardless of the dirt dug up (or missed) by sfc.
Be painfully aware that sfc has flagged files as broken, when in fact they weren’t. You’re looking for the automatic repair from sfc, not its diagnosis.
Here’s how to run sfc:
- Right-click the Start icon and choose Command Prompt (Admin).
- In the Admin (elevated) command prompt, type sfc /scannow and press Enter.
Yes, there’s a space between sfc and /scannow. It can take half an hour or longer, so go have a latte.
If sfc reports “Windows Resource Protection did not find any integrity violations,” you’re out of luck. Whatever problem you have wasn’t caused by scrambled Windows system files. If sfc reports “Windows Resource Protection found corrupt files and repaired them,” you may be in luck. The problem may have been fixed. If sfc reports “Windows Resource Protection found corrupt files but was unable to fix some of them,” you’re back in the doghouse.
- No matter what happened with sfc /scannow, run a DISM. Again, right-click the Start icon and choose Command Prompt (Admin). Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
Again, spaces before all the slashes, and note that’s a hyphen between Cleanup and Image. Press Enter and let it run: half an hour, an hour, whatever. If DISM finds any corrupt system files, it fixes them.
- Reboot and see if your system was fixed. It probably wasn’t, but at least you’ve taken the first step.
If you hit an odd error message or if one of the programs finds a bad file and can’t fix it, refer to Microsoft’s official documentation in KB 929833 for more information. (Don’t feel too complacent: See how the KB article is up to revision 26?)
The result of the scans is placed in the C:\Windows\Logs\CBS\CBS.log file. (CBS stands for Component Based Servicing.) You may want to make a zip of that file, in case one of Microsoft’s helpers needs to take a look.