What is the correct order of DISM and sfc commands to fix problems?

Page 4 of 5 FirstFirst ... 2345 LastLast

  1. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #31

    What is the correct order of DISM and sfc commands to fix problems


    PostmanPuzzled said:
    What is the correct order of DISM and sfc commands to fix problems?
    In
    Use the SFC tool to repair missing or corrupted system files - MSSupport
    MS said that the correct order was Dism then SFC.

    However, I believe that what they meant by that was merely that running Dism first increased the chances that SFC would be able to fix any faults it found [because Dism would have fixed any faults in the component store beforehand].
    - Nothing in the article provided any other reason to run Dism first.

    Personally, I run SFC and only bother with Dism if SFC has reported unfixable problems.

    All the best,
    Denis
      My Computer


  2. Posts : 41,473
    windows 10 professional version 1607 build 14393.969 64 bit
       #32

    For the script it was designed to run scannow both before and after scanhealth and restorehealth.

    This allows the end user and helpers to view any error messages and codes.

    And it allows the end user and helpers to see if anything was accomplished by running restorehealth.

    (Running restorehealth prior to scannow typically hides any corrected problems if the component store had corrected any scannow problems)
      My Computer


  3. Posts : 186
    Windows 10 Home x64 Version 21H2 Build 19044.1586]
       #33

    Reply to Zbook

    Here is the text result from completed bat file from Notepad

    Started on 27/09/2021 at 18:37:09.27 [SFC /ScanNow] Beginning system scan. This process will take some time.Results: Windows Resource Protection did not find any integrity violations. ================================================================== Started on 27/09/2021 at 18:40:45.42 [DISM /online /cleanup-image /ScanHealth] Deployment Image Servicing and Management toolVersion: 10.0.19041.844Image Version: 10.0.19043.1237 No component store corruption detected.The operation completed successfully. ================================================================== Started on 27/09/2021 at 18:43:25.59 [DISM /online /cleanup-image /RestoreHealth] Deployment Image Servicing and Management toolVersion: 10.0.19041.844Image Version: 10.0.19043.1237 The restore operation completed successfully.The operation completed successfully. ==================================================================The second "SFC /ScanNow" was skipped, as the first output the following:Windows Resource Protection did not find any integrity violations. ================================================================== Started on 27/09/2021 at 18:46:18.17 [ChkDsk /Scan] The type of the file system is NTFS.Volume label is Windows. Stage 1: Examining basic file system structure ... 1209344 file records processed. File verification completed.Phase duration (File record verification): 9.65 seconds.6476 large file records processed. Phase duration (Orphan file record recovery): 0.00 milliseconds.0 bad file records processed. Phase duration (Bad file record checking): 0.34 milliseconds. Stage 2: Examining file name linkage ... 3494 reparse records processed. 1485476 index entries processed. Index verification completed.Phase duration (Index verification): 41.84 seconds.0 unindexed files scanned. Phase duration (Orphan reconnection): 10.98 seconds.0 unindexed files recovered to lost and found. Phase duration (Orphan recovery to lost and found): 0.10 milliseconds.3494 reparse records processed. Phase duration (Reparse point and Object ID verification): 29.81 milliseconds. Stage 3: Examining security descriptors ... Security descriptor verification completed.Phase duration (Security descriptor verification): 216.05 milliseconds.138067 data files processed. Phase duration (Data attribute verification): 0.12 milliseconds.CHKDSK is verifying Usn Journal...35965208 USN bytes processed. Usn Journal verification completed.Phase duration (USN journal verification): 258.99 milliseconds.Windows has scanned the file system and found no problems.No further action is required. 234302463 KB total disk space. 167668168 KB in 509880 files.354224 KB in 138068 indexes.0 KB in bad sectors.1327095 KB in use by the system.65536 KB occupied by the log file.64952976 KB available on disk. 4096 bytes in each allocation unit. 58575615 total allocation units on disk.16238244 allocation units available on disk.Total duration: 1.05 minutes (63005 ms). ================================================================== Started on 27/09/2021 at 18:47:34.36 AutoReboot TRUE ================================================================== [Set AutoReboot = False] Updating property(s) of '\\HPLAPTOP\ROOT\CIMV2:Win32_OSRecoveryConfiguration.Name="Microsoft Windows 10 Home|C:\\WINDOWS|\\Device\\Harddisk0\\Partition3"'Property(s) update successful.================================================================== AutoReboot FALSE ================================================================== DebugInfoType 7 ================================================================== [Set DebugInfoType = 7]Updating property(s) of '\\HPLAPTOP\ROOT\CIMV2:Win32_OSRecoveryConfiguration.Name="Microsoft Windows 10 Home|C:\\WINDOWS|\\Device\\Harddisk0\\Partition3"'Property(s) update successful.================================================================== DebugInfoType 7 ================================================================== [WMIC PageFile list]AllocatedBaseSize=1280CurrentUsage=688Description=C:\pagefile.sysInstallDate=20200625204257.123020+0 60Name=C:\pagefile.sysPeakUsage=689Status=TempPageFile=FALSE ================================================================== AutomaticManagedPagefile TRUE ================================================================== [Set AutomaticManagedPagefile = True]Updating property(s) of '\\HPLAPTOP\ROOT\CIMV2:Win32_ComputerSystem.Name="HPLAPTOP"'Property(s) update successful.================================================================== AutomaticManagedPagefile TRUE ================================================================== [BcdEdit /enum {badmemory}]RAM Defects-----------identifier {badmemory} ================================================================== Finished on 27/09/2021 at 18:47:37.31

    Sorry if I should have put it in a new thread. Not sure what to call a new thread.

    - - - Updated - - -

    reply to Denis

    Thanks for input. Following zbook`s instructions somewhat belatedly.
      My Computer


  4. Posts : 41,473
    windows 10 professional version 1607 build 14393.969 64 bit
       #34

    The script results were unremarkable.
      My Computer


  5. Posts : 186
    Windows 10 Home x64 Version 21H2 Build 19044.1586]
       #35

    Is bad memory mentioned likely to cause trouble ? Or can I assume everything is ok ?

    Many thanks for your help. Amazing bat file ! Saved so much time and bother.
      My Computer


  6. Posts : 41,473
    windows 10 professional version 1607 build 14393.969 64 bit
       #36

    There was no bad memory found as it did not display any memory regions.
    (This was / is not a memory test)
      My Computer


  7. Posts : 186
    Windows 10 Home x64 Version 21H2 Build 19044.1586]
       #37

    Thanks again.
      My Computer


  8. Posts : 41,473
    windows 10 professional version 1607 build 14393.969 64 bit
       #38

    Your're welcome.
      My Computer


  9. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #39

    NCBillP said:
    … I ran sfc. The claim was unrepairable corrupt files.
    … I looked at the log files that sfc produced and they were pristine with no complaints.
    Perhaps I have misunderstood you.
    - SFC reports irreparable errors?
    - Extracting SFC results from CBS.log contains no irreparables [SFC-DISM - TenForumsTutorials, Option 5***]?

    *** Or, for a more focussed output,
    findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >"SomePathOrOther\SFCResults-Unrepairables.Log"
    Using a real path in place of SomePathOrOther


    Denis
      My Computer


  10. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #40

    General question on sfc/dism order:

    Would seem to me that if my objective is to get a clean "sfc /scannnow" output as quickly as possibly, that running dism with /checkhealth option first (took less than a second execution time on my PC), then only if /checkhealth found corruption - run dism with /restorehealth option would be the preferred way to go. Then finally run "sfc /scannnow".

    Am I missing something with this reasoning?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:37.
Find Us




Windows 10 Forums