• DISM vs SFC usage

    Author
    Topic
    #2574138

    Proper usage of these 2 programs?

    I assumed that whenever Windows Update performed an Update that the DISM database(?) was also updated and available to run the SFC commands against.

    I have never run the DISM CheckHealth option, but do run the SFC /verifyonly and SFC /scannow options after each update.  I hardly have any issue but if SFC finds a problem it always fixes it.

    Is this OK, or am I running SFC against an outdated database?

    Windows 10 Pro x64 v22H2 and Windows 7 Pro SP1 x64 (RIP)
    Viewing 2 reply threads
    Author
    Replies
    • #2574156

      If sfc gives you a clean bill of health, you should be OK.

      If a problem is not fixable with sfc, it is a good idea to run these commands, in an Elevated Command Prompt, in this sequence:
      chkdsk /f  (reboot required)
      DISM /Online /Cleanup-Image /RestoreHealth
      sfc /scannow

      2 users thanked author for this post.
    • #2574276

      Why that order?
      chkdsk first makes sense, you want the disk to be OK before fixing other things.

      cheers, Paul

      • #2574326

        Why that order?

        System File Checker needs a known-good image from which to restore any corrupted system files.  I use that same order because in the distant past when I ran System File Checker first and received the result that corrupt files were found but couldn’t be repaired, I ran the restorehealth command, then ran System File Checker again, and it was able to repair all corrupted files.

        Restorehealth restores a known-good image from which sfc can extract known-good files to replace corrupted files.  The logical progression is to first provide a known-good image before checking system files, in case corrupted files are encountered.

        DISM-sfc

        This sequence took 2:06.15 for completion, including my typing in the commands.

        Always create a fresh drive image before making system changes/Windows updates; you may need to start over!
        We all have our own reasons for doing the things that we do with our systems; we don't need anyone's approval, and we don't all have to do the same things.
        We were all once "Average Users".

        3 users thanked author for this post.
    • #2574300

      DISM = Deployment Image Servicing and Management; a tool used to service Windows images.

      SFC = System File Checker; a tool that repairs missing/corrupted system files.

      Basically, SFC does a “quick scan” of just the primary system files and tries to repair any problems it finds while DISM scans everything (i.e. the whole OS including stored backups of installed files, updates, patches and packages) and tries to fix any problems it finds.

      While the order you run them in doesn’t really matter, the sequence “normally” recommended is:

      DISM /Online /Cleanup-Image /ScanHealth
      SFC /scannow

      Because, if SFC needs to replace one or more files, it’ll fail if the primary store where the backup copies of files are located is corrupt.

      Running DISM’s /ScanHealth first lets you know whether the store is good or not and, if it’s not, you’ll need to run the /RestoreHealth option before running SFC.

      4 users thanked author for this post.
      • #2574319

        While the order you run them in doesn’t really matter, the sequence “normally” recommended is:
        DISM /Online /Cleanup-Image /ScanHealth
        SFC /scannow

        I have never run /scanhealth, my reasoning being that running /restorehealth does essentially the same thing plus repairs what it finds.

        As for chkdsk, that can be run from File Explorer.  Right click the drive in question, click Properties, click the Tools tab, then click Check.

        Chkdsk
        Success
        Event
        I run the restorehealth/sfc combo at least once a month, likely every couple of weeks.

         

         

        Always create a fresh drive image before making system changes/Windows updates; you may need to start over!
        We all have our own reasons for doing the things that we do with our systems; we don't need anyone's approval, and we don't all have to do the same things.
        We were all once "Average Users".

        1 user thanked author for this post.
        • #2574384

          I have never run /scanhealth, my reasoning being that running /restorehealth does essentially the same thing plus repairs what it finds

          +1 One step instead of two, with an immediate fix, leaving one to carry on computing..

          Windows - commercial by definition and now function...
    Viewing 2 reply threads
    Reply To: DISM vs SFC usage

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: