Run SFC Command in Windows 10  

Page 21 of 25 FirstFirst ... 111920212223 ... LastLast

  1. KCR
    Posts : 204
    Windows 10 Home, 64-bit, Version 1909 (OS Build 18363.693)
       #200

    Thanks Denis,

    Just a quick question about running sfc /scannow, or most other commands.

    I always have to include an .exe right after sfc . . . is that normal ?

    Run SFC Command in Windows 10-run-sfc.png


    Or, am I doing something else wrong ?



    Lol, OK I will do that. . . . .
    Run SFC Command in Windows 10-image.png
      My Computer

  2. Try3's Avatar
    Posts : 4,379
    Windows 10 Home x64 Version 1909 Build 18363.778
       #201

    I do not know how you are opening your Command prompt window but I wonder if the method you are using might be associated with the problem you are having because I have never seen a window title "Select Administrator:" - it is normally just "Administrator:"

    I never have to type in sfc.exe, just sfc
    Run SFC Command in Windows 10-screenshot-298-.png
    Irrelevant bit blacked out & don't worry about the colours as they are just additional settings I have put in.

    Denis
      My Computer


  3. KCR
    Posts : 204
    Windows 10 Home, 64-bit, Version 1909 (OS Build 18363.693)
       #202

    Try3 said:
    I do not know how you are opening your Command prompt window but I wonder if the method you are using might be associated with the problem you are having because I have never seen a window title "Select Administrator:" - it is normally just "Administrator:"

    Denis
    This method usually. . .

    Run SFC Command in Windows 10-image.png

    Or. . .
    Run SFC Command in Windows 10-image.png


    System File Checker runs fine without an .exe in PowerShell, though. . . .

    Run SFC Command in Windows 10-ps-sfc-run.png


    I'm hijacking this thread, so lets forget about the issue for the moment . . . .



    .
    Last edited by KCR; 12 Jun 2018 at 22:50.
      My Computer


  4. Posts : 32,393
    windows 10 professional version 1607 build 14393.969 64 bit
       #203

    Try3 said:
    I always do the same jobs with SFC so I have set them up as shortcuts both for convenience and to avoid typos.

    It occurred to me that other users might like to do the same so here are the shortcuts I use.
    - My shortcuts all run minimised [right-click on each shortcut, Properties, Run - select Minimised]
    - All these shortcut must be set to run as Admin [right-click on each shortcut, Properties, Advanced, set Run as Admin]
    - For those shortcuts that create output files, I send the output to D:\Desktop but you'll need to substitute your own full folder path
    - For those shortcuts that create output files, each shortcut does its job then closes because its output file is the only thing of interest
    - For those shortcuts that create output files, the output file will be blank if there are no results to display


    Shortcut 1 - Run SFC
    - My shortcut is called SFC - ScanNow
    - The SFC window remains open when SFC finishes so you can have a look at its completion report
    - I normally use a variant of this 'baseline' shortcut - see #5 below
    Code:
    %windir%\system32\cmd.exe /k "%windir%\System32\sfc.exe /ScanNow"

    Shortcut 2 - Extract all SFC results
    - My shortcut is called SFC Results 1 All
    Code:
    %windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >D:\Desktop\SFCResults.Log"

    Shortcut 3 - Extract list of items that SFC could not repair
    - My shortcut is called SFC Results 2 Unrepairables
    Code:
    %windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >D:\Desktop\SFCResults-Unrepairables.Log"

    Shortcut 4 - Extract list of items that SFC repaired successfully
    - My shortcut is called SFC Results 3 Repairs
    Code:
    %windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >D:\Desktop\SFCResults-Repairs.Log"


    Shortcut 5 - Run SFC with completion indicator
    - In this variant, the Taskbar tab label changes when SFC finishes so I do not need to keep opening the SFC window to find out if it has finished or not
    - The Taskbar label starts off as SFC - ScanNow
    - When SFC finishes, the Taskbar label changes to Administrator: SFC complete {or as much of that as will fit in the Taskbar tab}
    - I have never found any method for avoiding Administrator: getting stuck on the front

    - My shortcut is called SFC - ScanNow
    - The name is the same as #1 above because I use it as a substitute for that one
    - The SFC window remains open when SFC finishes so you can have a look at its completion report
    Code:
    %windir%\system32\cmd.exe /k "%windir%\System32\sfc.exe /ScanNow & Title SFC complete"


    I hope this is useful for somebody,
    Denis

    The first command worked on multiple computers as sfc /scannow did.
    For shortcuts 2 - 4 if a computer only has a C: drive how do you modify the above commands so that it does not display: The system cannot find the path specified?
      My Computer

  5. Try3's Avatar
    Posts : 4,379
    Windows 10 Home x64 Version 1909 Build 18363.778
       #204

    You substitute your own chosen output folder, a folder for which you should have appropriate access, where I have written D:\Desktop or, in other words, "For those shortcuts that create output files, I send the output to D:\Desktop but you'll need to substitute your own full folder path".

    You might, just for example, choose C:\Users\YOURUSERNAME\Desktop if such a folder exists.

    Denis
      My Computer


  6. Posts : 32,393
    windows 10 professional version 1607 build 14393.969 64 bit
       #205

    The computer had a clean install and there are no files on the desktop with the exception of the recycle bin.
    A right click was done creating a new folder named "sfc results".
    There is now only one folder on the desktop: sfc results
    What are the commands for shortcuts 2 -4 that will not display "The system could not find the path specified."

    Code:
    DISKPART> list volume
    
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
      Volume 0     E                       DVD-ROM         0 B  No Media
      Volume 1     C                NTFS   Partition    237 GB  Healthy    Boot
      Volume 2         Recovery     NTFS   Partition    450 MB  Healthy    Hidden
      Volume 3     F                FAT32  Partition    100 MB  Healthy    System
      Volume 4     D   ESD-USB      FAT32  Removable     32 GB  Healthy
      My Computer

  7. Try3's Avatar
    Posts : 4,379
    Windows 10 Home x64 Version 1909 Build 18363.778
       #206

    Whatever the full path to your sfc results folder is.
    I do not know what that is because I do not know where your desktop is but you can find out by looking in C:\Users\YOURUSERNAME\Desktop first because that is where the desktop will be if you have not relocated it.
    Alternatively, right-click on your sfc results folder, select Properties then in its General tab read the entry for Location.

    Denis
      My Computer



  8. Posts : 32,393
    windows 10 professional version 1607 build 14393.969 64 bit
       #207

    Using the path displayed in properties these were the administrative command prompt displayed results:
    Code:
    Microsoft Windows [Version 10.0.15063]
    (c) 2017 Microsoft Corporation. All rights reserved.
    
    C:\Windows\system32>
    C:\Windows\system32>%windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >C:\Users\aaaaaaaa\Desktop\sfc results"
    FINDSTR: Cannot open results
    
    C:\Windows\system32>%windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >C:\Users\aaaaaaaa\Desktop\sfc results-Unrepairables.Log"
    FINDSTR: Cannot open results-Unrepairables.Log
    
    C:\Windows\system32>%windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >C:\Users\aaaaaaaa\Desktop\sfc resultsRepairs.Log"
    FINDSTR: Cannot open resultsRepairs.Log
    
    C:\Windows\system32>
    Notepad was opened and initially there were displayed results. Then the third and forth commands were run. When notepad was viewed again it only displayed:

    Code:
    C:\Windows\Logs\CBS\CBS.log:2018-06-12 22:02:00, Info                  CSI    000057a6 [SR] Repairing 0 components
    C:\Windows\Logs\CBS\CBS.log:2018-06-12 22:02:00, Info                  CSI    000057a8 [SR] Repair complete
    The sfc results folder remained empty. There was a new file on the desktop: sfc
      My Computer

  9. Try3's Avatar
    Posts : 4,379
    Windows 10 Home x64 Version 1909 Build 18363.778
       #208

    If you want to save the output using paths that contain spaces then these commands, along with every other command, require you to enclose the path in ".

    If C:\Users\aaaaaaaa\Desktop is the path to your desktop but you want to use a subfolder called sfc results then your output files should be given in the form
    Code:
    %windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >"C:\Users\aaaaaaaa\Desktop\sfc results\SFCResults.Log""
    Code:
    %windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >"C:\Users\aaaaaaaa\Desktop\sfc results\SFCResults-Unrepairables.Log""
    Code:
    %windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >"C:\Users\aaaaaaaa\Desktop\sfc results\SFCResults-Repairs.Log""
    Denis
    Last edited by Try3; 13 Jun 2018 at 11:48.
      My Computer


  10. Posts : 32,393
    windows 10 professional version 1607 build 14393.969 64 bit
       #209

    There was an automatic upgrade from 15063 to 17134 late yesterday.
    These are the latest commands and results:

    Microsoft Windows [Version 10.0.17134.112]
    (c) 2018 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>%windir%\system32\cmd.exe /k "%windir%\System32\sfc.exe /ScanNow"

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.
    Verification 100% complete.

    Windows Resource Protection did not find any integrity violations.

    C:\WINDOWS\system32>%windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >"C:\Users\aaaaaaaa\Desktop\sfc results\SFCResults.Log""
    The system cannot find the path specified.

    C:\WINDOWS\system32>%windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >"C:\Users\aaaaaaaa\Desktop\sfc results\SFCResults-Unrepairables.Log""
    The system cannot find the path specified.

    C:\WINDOWS\system32>%windir%\system32\cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >"C:\Users\aaaaaaaa\Desktop\sfc results\SFCResults-Repairs.Log""
      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 Threads
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 14:39.
Find Us




Windows 10 Forums