Getting a list of what files "sfc /scannow" repaired


  1. Posts : 152
    Windows 10 Home
       #1

    Getting a list of what files "sfc /scannow" repaired


    Is there a way to find what files were repaired with the CMD code "sfc /scannow"? With that information you could form an idea of what mechanisms and applications could potentially cause system errors or precisely what is faulty and dysfunctioning in the OS.

    They might be repairable this time but next time they could be unfixable and you wouldn't know what ones they were.
      My Computer


  2. Posts : 497
    Windows 10 Home x64
       #2

    The SFC.exe program writes the details of each verification operation and of each repair operation to the CBS.log file.

    Each SFC.exe program entry in this file has an [SR] tag.

    The CBS.log file is located in the %windir%\Logs\CBS folder.

    C:\Windows\Logs\CBS
      My Computers


  3. Posts : 31,671
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #3

    Sapien 1 said:
    Is there a way to find what files were repaired with the CMD code "sfc /scannow"? With that information you could form an idea of what mechanisms and applications could potentially cause system errors or precisely what is faulty and dysfunctioning in the OS.
    As rooscoota says, all the results are in CBS.log. But there's an awful lot else in there too from other processes. To see just the SFC /ScanNow results, the files it repaired (and any it couldn't) use Option Five in this tutorial.

    Run SFC Command in Windows 10

    They might be repairable this time but next time they could be unfixable and you wouldn't know what ones they were.

    SFC /ScanNow fixes files by replacing then with good copies from the WinSxS component store. If SFC reports it cannot fix files, then that will be because the copy in the component store is also corrupted. SFC will report this in in the CBS.log and tell you which files they are.

    If the component store is corrupted you can repair it with DISM's RestoreHealth option. Then you can run SFC again.

    Use DISM to Repair Windows 10 Image
      My Computers


  4. Posts : 152
    Windows 10 Home
    Thread Starter
       #4

    Bree said:
    As rooscoota says, all the results are in CBS.log. But there's an awful lot else in there too from other processes. To see just the SFC /ScanNow results, the files it repaired (and any it couldn't) use Option Five in this tutorial.

    Run SFC Command in Windows 10




    SFC /ScanNow fixes files by replacing then with good copies from the WinSxS component store. If SFC reports it cannot fix files, then that will be because the copy in the component store is also corrupted. SFC will report this in in the CBS.log and tell you which files they are.

    If the component store is corrupted you can repair it with DISM's RestoreHealth option. Then you can run SFC again.

    Use DISM to Repair Windows 10 Image
    Where does DISM get the items to repair the Component Store?
      My Computer


  5. Posts : 31,671
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #5

    Sapien 1 said:
    Where does DISM get the items to repair the Component Store?
    The default is that it will download them direct from Microsoft. There are also options to tell it to use a local copy of the install media, if you have one. This can be useful if you can't go online..
      My Computers


  6. Posts : 32
    Windows 10 Pro. x64 22H2
       #6

    See the following for how to deal with cbs.log: [How To} Analyze the log file entries that SFC.exe generates in Windows

    I had some issues with this a couple of days ago and, after following the instructions given in the above link, it turned out that the repairs done on my system were trivial, it's not always a disaster.

    Tip: To see what files were repaired search the sfcdetails.txt that you created for the term repairing (this will save you lots of time). To see what, if any files, could not be repaired search the sfcdetails.txt for the term cannot (this will save you lots of time).
      My Computer


  7. Posts : 152
    Windows 10 Home
    Thread Starter
       #7

    Bree said:
    As rooscoota says, all the results are in CBS.log. But there's an awful lot else in there too from other processes. To see just the SFC /ScanNow results, the files it repaired (and any it couldn't) use Option Five in this tutorial.

    Run SFC Command in Windows 10




    SFC /ScanNow fixes files by replacing then with good copies from the WinSxS component store. If SFC reports it cannot fix files, then that will be because the copy in the component store is also corrupted. SFC will report this in in the CBS.log and tell you which files they are.

    If the component store is corrupted you can repair it with DISM's RestoreHealth option. Then you can run SFC again.

    Use DISM to Repair Windows 10 Image
    So, WinSxS is also called the Component Store?
      My Computer


  8. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #8

    Sapien 1 said:
    Is there a way to find what files were repaired with the CMD code "sfc /scannow"?
    I agree with the others who pointed you to the tutorial's Option 5 to extract your results
    SFC - TenForumsTutorials
    but, just to save you a bit of effort, I use this shortcut to extract a list of repaired items
    Code:
    cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >"F:\Users\%UserName%\Desktop\%ComputerName%-SFCResults-Repairs.Log""
    - It does not need elevation.
    - To use this in a Command prompt window, you just drop the cmd.exe /c and you'll also find that the %windir%\system32\ is not essential.
    - You can save the output file [which is a standard text file] wherever you want & using whatever name.extension you want.
    - I include the computer name so I don't get mixed up between results from different computers.
    - There are some variations on this theme in Extracting SFC results - My TenForumsTutorials ditty

    SFC is pretty dumb. You will often see this in the results for repaired items.
    Code:
    2022-11-27 12:10:07, Info                  CSI    00000215 [SR] Repairing 0 components
    2022-11-27 12:10:07, Info                  CSI    00000217 [SR] Repair complete

    If you ever have irreparable items then use the Dism command given in the notes at the end of the tutorial's Option 3 whilst connected to the internet so that Dism can use WU mechanisms to retrieve replacements for the irreparable files.



    All the best,
    Denis
      My Computer


  9. Posts : 152
    Windows 10 Home
    Thread Starter
       #9

    Sapien 1 said:
    So, WinSxS is also called the Component Store?
    That was a dumb question, here's the answer:
    https://learn.microsoft.com/en-us/wi...iew=windows-11
      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 09:39.
Find Us




Windows 10 Forums