Run SFC Command in Windows 10  

Page 24 of 27 FirstFirst ... 142223242526 ... LastLast
  1. Try3's Avatar
    Posts : 7,378
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #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. Brink's Avatar
    Posts : 56,188
    64-bit Windows 10 Pro for Workstations build 21354
    Thread Starter
       #231

    No problem. Done.
      My Computers

  3. Try3's Avatar
    Posts : 7,378
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #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 14:20.
      My Computer

  4. Brink's Avatar
    Posts : 56,188
    64-bit Windows 10 Pro for Workstations build 21354
    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. Try3's Avatar
    Posts : 7,378
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #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. Brink's Avatar
    Posts : 56,188
    64-bit Windows 10 Pro for Workstations build 21354
    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. Farvatten's Avatar
    Posts : 642
    Windows 10 Pro 64bit 20H2 19042.906
       #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. Brink's Avatar
    Posts : 56,188
    64-bit Windows 10 Pro for Workstations build 21354
    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. Farvatten's Avatar
    Posts : 642
    Windows 10 Pro 64bit 20H2 19042.906
       #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. reddwarf4ever's Avatar
    Posts : 1,234
    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


 
Page 24 of 27 FirstFirst ... 142223242526 ... LastLast

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




Windows 10 Forums