SFC Fails To Fix Errors – What Now?


dism-broken-windows

We all know that Windows breaks from time to time. It is part of the daily chore. If you’ve never had a Windows installation break  then I can only presume you’re a master or a magician. It could be that you’ve never used Windows in the first place. Say! That is a possibility– n’est-ce pas?

 

This is going to be short and sweet.

 Opening an Administrator Command Box

Windows 8.x

  • Right-click the Start Button and choose Command Prompt (Admin)

Done…

Windows 7 and before…

  • To start a command prompt as an administrator
  • Click Start, click All Programs, and then click Accessories.
  • Right-click Command prompt, and then click Run as administrator.
  • If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.

To start a command prompt as an administrator (alternative method)

  • Click Start.
  • In the Start Search box, type cmd, and then press CTRL+SHIFT+ENTER.
  • If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.

Done… finally…


It doesn’t matter how many nay-sayers are out there. Windows 8 rocks! Nobody listens to me 🙁

The whole point of this painful exercise is to run a System File Check against the original files that are supposed to be integrated within your system. SFC does just that. The files against which they are compared is called the  Component Store and is supposed to contain all the original and updated (Windows Updates) files required by the Operating System (OS), namely, Windows.

Windows SxS – The Component Store

Windows Side by Side (SxS) is a huge directory of files that is supposed to contain all the updates and files in their original configuration. This is supposed to ensure that your Operating System (ie, Windows ) cannot be broken. A simple comparison of SxS will immediately demonstrate any flaw in the currently used files and can therefore be replaced with the supposedly flawless copy. That’s the plan, at least.

The underlying problem is that the SxS files can themselves become corrupted making the comparison useless.  It also causes SFC to burp when it finds a problem. That’s where DISM comes in. Let’s start from the beginning.

System File Checker (SFC)

The inherent weakness of SFC is that it only makes comparisons against what is already on your computer. If the Component Store is crappitated, the check is a waste of time and it will throw up– an error that cannot be fixed. What good is that?


Note to the unenlightened: “Crappitated” is a word that many of you will not have encountered before this wonderful and uplifting story. I checked the spelling. I did not make it up. It is a valid word that only technology journalists know about. And I’ve just shared it with you. My public. Trust me. 

dism-unknown-command

System File Checker (SFC) compares your Component Store against what is on your computer, that is, how your computer starts and runs. Basically, the “knowledge” it has.

Deployment Image Service and Management (DISM) compares what is on your system against what is in the “cloud”, that is, what Microsoft says it’s supposed to be. The two may be different.

It’s that simple.

Does Running SFC Make Sense?

Comparing files that already exist on your computer against files that already exist on your computer may at first glance appear to be a good idea. It may also appear to be a pretty lame idea.

If those files have been corrupted by some form of malware, then those so-called original, pristine  files are pretty much useless when it gets down to verification purposes.

Step One – Run SFC

  • Open an Admin Command Box
  • Type: sfc /scannow\
  • Wait… patiently… for… a… while…
  • If no errors show up, then wonderful! You’re done.
  • If errors show up that can’t be fixed, then we’re on to Step Two.

Step Two – Try DISM

This may or may not work. I have had varying success rates using this little-known command. It turns out, that our editor in chief, James Hillier, was recently able to “fix” his computer using the DISM command. That says a lot considering that Jim is a knowledgeable and computer-savvy sort of guy. Note:  I may be biased in my assessment.of said editor. Sorry for the discomfiture.

  • Open an Admin Command Box and type one of the following to run DISM in the manner you choose:
  • Dism /Online /Cleanup-Image /CheckHealth
  • Dism /Online /Cleanup-Image /ScanHealth
  • Dism /Online /Cleanup-Image /RestoreHealth

I don’t have a clue what the difference is between the ScanHealth and CheckHealth switches are. You may do some research if you like. Regardless, it may take some time to run, from a few minutes to many depending on your system. If I remember right, it took about 15 minutes or so for mine to complete.

Update 9/20 –  One of our readers, B, offered this very helpful information:

/CheckHealth – This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

/ScanHealth – This switch option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This is useful for only logging what, if any, corruption exists. This should take around 5-10 minutes to finish.

/RestoreHealth – (recommended) This switch option checks for component store corruption, records the corruption to the log file, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes up to about an hour to finish depending on the level of corruption.

Thanks, B!


 

admin-command-box-image

If you access the help menu for DISM, you will notice the “switches” I suggest are not necessarily shown by default. This is normal. Undocumented “switches”, or “parameters” are a consequence of geeky programming people who can not seem to master the language of the masses. They are, on the other hand, quite fluent in areas devoted to complication and obfuscation.

SFC is recommended by many people in-the-know. DISM is generally unknown, and therefore not suggested.

This may take a lot of time and might result in no positive effect. It’s a shot in the dark but worth a try.

That’s it! Like I said, this may or may not help you. I have experienced varying degrees of success using the DISM command, but Hey! Any chance at success in these dire times is worth the effort, is it not?

Richard

 

About the Author

Richard Pedersen

Richard received his first computer, a C-64, in 1982 as a gift and began dabbling in BASIC. He was hooked! His love for computing has led him from the old “XT” boxes to the more modern fare and from clunky 10MB hard drives to smooth and fast modern day SSD drives. He has run BBS services, Fido mail, and even operated his own computer repair business.

19 Comments

  1. Very useful Richard, thanks. I ran the scanhealth one on my Windows 7 PC which told me I had 4 errors. I guessed that the RestoreHealth switch would fix these errors but when I ran that I got “Error 87 – the RestoreHealth option is not recognised in this context”. Have you come across different contexts where you can run these commands?

    • Hi Geoff Truss,

      I have never seen this error but running a quick search on the Internet showed many people who have.

      As usual, the results are mixed but I’m getting a sense that the RestoreHealth switch was added in Windows 8 and higher.

      Try running: Dism /Online /Cleanup-Image /?

      This should show you a list of the available switches for your version of Windows. If RestoreHealth is not in the list, you won’t have any luck trying to use it.

      I don’t have a Win7 computer anymore and can’t test this myself.

      If you find more information and/or a fix for this issue, please let me know so I can update this post.

      Thank you,
      Richard

  2. Richard,

    This was very useful information.
    Some additional info from: http://tinyurl.com/okrp8nl
    “/CheckHealth – This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

    /ScanHealth – This switch option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This is useful for only logging what, if any, corruption exists. This should take around 5-10 minutes to finish.

    /RestoreHealth – (recommended) This switch option checks for component store corruption, records the corruption to the log file, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes up to about an hour to finish depending on the level of corruption.”

    Thanks again!

    • Hi dan,

      I don’t know what version of Windows first incorporated DISM. I do know that Windows 7 has this basic command, although more “switches”, aka Parameters, have been added in Windows 8.x.

      I can only guess, but I would have to say that a DISM download is probably not available for Vista.

      I could be wrong, of course, and you can certainly search the MS site for more information on this. If you should happen to find DISM on a non-MS supported site, I would be wary. The bad guys are everywhere.

      If you find a solution, we would most certainly like to hear about it.

      Thanks,
      Richard

  3. One last comment: When I tried executing DISM I received an error stating that the ONLINE option is not supported in Vista 🙁

    • Hi dan,

      Regarding your previous comment, the GUI’s author you reference says he has not implemented the “online” switch.

      Regarding this comment, it demonstrates that the Vista version of DISM does not include this needed switch, either.

      As an aside, and meaning no disrespect, perhaps it is time to dump the mostly loathed Vista platform in favor of a modern operating system?
      Keeping in mind that Windows 9 is going to become publicly available in the next few months, you might consider moving a few dollars towards that goal, rather than bucking an out-dated system.

      Windows 7 is no longer a good option because Windows 9 is in the wings. And Windows 8.x is nearly as despised as Vista was, though I have never understood why– other than the idea that people don’t like change.

      Heck! Change is what life is all about! Death, on the other hand, is what stagnation is all about. I’ve never heard of a dead person attaining new heights or experiencing epiphanies. Perhaps I am out of the “loop”– in this particular instance, I don’t mind one iota 😉

      If a person is concerned about hardware compatibility, I can safely say that Windows 8 is less demanding than many previous Windows versions so I will be brave and predict that Win9 will be much the same in that regard.

      You won’t be disappointed by upgrading your operating system, I am sure,
      Richard

  4. Hi, read your v.interesting article and decided “what have I got to lose by trying this”. I’m running Windows 8.1 PRO.

    Ran ‘sfc /scannow’ and notified of corrupt files and that some could not be fixed.

    Ran ‘Dism /Online /Cleanup-Image /RestoreHealth’ and told operation completed successfully and the component store corruption was repaired.

    Each operation took about 15-20 minutes.

    Thank you.

  5. Thank you Richard and DCT!  This is the most useful and needed tip I’ve found in nearly ten years web browsing.

    I was preparing for my six monthly “Win refresh”.  The “SFC /Scannow problem” has bugged me through Win 7, 8, and 8.1.
    Telling me that there is corruption and referring me to a large, unintelligible log file is less than helpful.

    I followed your instructions and problem is solved.  Even after a reboot, I still have the comforting message:
    “Windows Resource Protection did not find any integrity violations.”  No “refresh” needed.

    I’m grateful!