Run SFC Command in Windows 10  

Page 24 of 31 FirstFirst ... 142223242526 ... LastLast

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

    Brink,

    Sorry, I didn't give the reason that I posted all that.

    In the tutorial option 3 para 4 second sub-para, I suggest adding a note about connecting to the internet before running Dism /Online /Cleanup-Image /RestoreHealth

    Denis
      My Computer


  2. Posts : 68,977
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #231

    No problem. Done.
      My Computers


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

    Extracting SFC results


    Brink,

    I've been reviewing my use of SFC and noticed that Option 5 states that elevated commands are needed to extract results. That is no longer the case. Normal command prompts & normal shortcuts can be used to extract results.

    I've amended my post #199 Run SFC using shortcuts to reflect this change.

    I do not know when the change happened. Perhaps Windows 10 has never needed elevation to extract results but I kept doing it because I had to in Windows 7?



    I don't know if you are interested in listing variations of results' extractions - extracting all, extracting repairs, extracting failures to repair, extracting failures to "reproject".
    I find that reducing the amount of data in each individual file makes the job easier.
    Here are the ones I use -

    Intro
    You can use findstr commands to extract just the entries in the CBS log that you want.
    - You never need to look through the entire log.
    - SFC writes to the CBS log and its entries contain [SR]
    - Other Windows functions, such as Windows installer, also write to the CBS log but these other entries do not contain [SR].
    - Windows does archive the CBS log when it sees fit so you should extract results when you find an SFC problem and not leave it for a rainy day. If you do leave it too long, you might find the data you want in the archive files in %windir%\Logs\CBS [they are called cbsPersist...log] but these are not kept forever either.

    Extraction 1 - Extract all SFC results [the one you currently provide in Option 5]
    - Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you
    Code:
    findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults.Log
    .

    Extraction 2 - Extract list of items that SFC repaired successfully
    - Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you.
    Code:
    findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults-Repairs.Log
    - The Repairs.Log normally has 2 apparently spurious entries when no repairs were needed -
    2020-03-04 16:31:13, Info CSI 00000245 [SR] Repairing 0 components
    2020-03-04 16:31:13, Info CSI 00000247 [SR] Repair complete



    Extraction 3 - Extract list of items that SFC could not repair

    - Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you.
    Code:
    findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults-Unrepairables.Log"


    Extraction 4 - Extract list of items that SFC "could not reproject"
    - I have never found a decent explanation of this type of failure but, because each entry includes "source file in store is also corrupted", I believe that it can serve as an explanation for a corresponding entry in the irrepairables list.
    - Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you.
    Code:
    findstr.exe /c:"[SR] Could not reproject" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults-CouldNotReproject.Log


    Denis
    Last edited by Try3; 04 Mar 2020 at 15:20.
      My Computer


  4. Posts : 68,977
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #233

    Thank you Denis @Try3,

    I would have thought that access to the CBS.log file would require elevated rights.

    I think I will leave it for now though since you say you don't get as many [SR] results when not using an elevated command/PowerShell.
      My Computers


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

    Brink said:
    I think I will leave it for now though since you say you don't get as many [SR] results when not using an elevated command/PowerShell.
    No, I get exactly the same results. I just deliberately split my results into separate files because I find them easier to work with.
    The results of findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults.Log are exactly the same whether an admin or std account is used.

    I've amended my post in the hope of removing ambiguity.

    Denis
      My Computer


  6. Posts : 68,977
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #235

    Try3 said:
    No, I get exactly the same results. I just deliberately split my results into separate files because I find them easier to work with.
    The results of findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults.Log are exactly the same whether an admin or std account is used.

    I've amended my post in the hope of removing ambiguity.

    Denis
    Ah, ok. It'll be interesting to hear from others if they also experience the same.
      My Computers


  7. Posts : 915
    Windows 10 Pro 64bit 22H2 19045.3324
       #236

    Brink said:
    Ah, ok. It'll be interesting to hear from others if they also experience the same.
    woops.. extract...

    Clearly I did miss something... ;o(
      My Computers


  8. Posts : 68,977
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #237

    Farvatten said:
    Unless I'm missing something, I remain unable to run sfc /scannow with my admin account unless I ask for elevated privileges. My UAC is set to the default.
    Yeah, you will still need to use an elevated command prompt to run the SFC command.

    It's only option 5 seems to no longer require an elevated command prompt.
      My Computers


  9. Posts : 915
    Windows 10 Pro 64bit 22H2 19045.3324
       #238

    Brink said:
    It's only option 5 seems to no longer require an elevated command prompt.
    Update now that I understand... ;o)

    Like @Try3 I AM seeing the same results from either Elevated or Non-Elevated Command prompts for:

    findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
      My Computers


  10. Posts : 1,523
    windows 10 PRO
       #239

    Running the offboot CMD as in guide, but get Windows resource protection could not start the service

    trued starting the service, the same same command window, but result was the same
      My Computer


 

Tutorial Categories

Run SFC Command in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  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 10:16.
Find Us




Windows 10 Forums