By replacing damaged or corrupt OS files, DISM Trumps SFC To Fix Hung Execution.

DISM Trumps SFC To Fix Hung Execution

Here’s an interesting observation straight from TenForums. Occasionally, the System File Checker (SFC) will hang when run. That is, it will grind forward to some percentage of completion, and then sit there indefinitely, making no further progress. If that happens to you on a Windows 10 PC, it’s OK to terminate the process (enter Ctrl-C at the command line or in PowerShell). In such cases, DISM trumps SFC to fix hung execution. Let me explain…

How DISM Trumps SFC to Fix Hung Execution

To unpack my assertion, please understand that when SFC finds an error it cannot fix, it more or less stops where it is. The Deployment Image Servicing and Management tool, aka DISM, can replace the files in Winodws 10’s cross-linked code repository WinSxS. By doing so, it will often fix the errors that SFC cannot surmount successfully.

The syntax for the specific DISM incantation is most often:

DISM /online /cleanup-image /restorehealth

Other variations for offline images, or that use something other than local files already known to Windows 10 are documented at MS Docs. There you’ll find a helpful article entitled “Repair a Windows Image” that take you through various elaborations that may sometimes prove necessary. Using the Source: attribute can get particularly interesting, especially if you’re working from a WIM or ESD file that is home to two or more Windows images.

If SFC Hangs, DISM /RestoreHealth Often Sets Things Right

As it did for the person who posted about SFC difficulties at TenForums, this approach will often (but not always) make things right. You can’t know until you try. But the thing to remember is that if SFC hangs or fails, your next step should be to try this specific DISM command.

In my personal experience, this has fixed half or more of such issues when they’ve come up. If the odds come up as they should, this approach will also work for you. Try it, and see!

[Note Added Feb 16 afternoon]:
Go Ahead: Skip SFC, Run DISM First

Members of the Insider Team responding to this post informed me that “On Win10 it’s recommended to run DISM first.” This is explained in an MS Support Note entitled “Use the System File Checker tool to repair missing or corrupted system files.” And sure enough, in reading over that article it informs readers “If you are running Windows 10 … first run the inbox Deployment Image Servicing and Management (DISM) tool prior to running the System File Checker.” I’m not sure what “inbox” means in this context, but the order is clear and unmistakable: DISM first, SFC second.

I’ve been following typical advice from TenForums and conventional wisdom for so long, I neglected to read up on SFC in putting this story together. Live and learn: now I know to reverse the order and run DISM first. Hope this helps others, too!


Leave a Reply

Your email address will not be published. Required fields are marked *