Run SFC Command in Windows 10  

Page 21 of 22 FirstFirst ... 1119202122 LastLast

  1. Posts : 141
    Windows 10 Home, 64-bit, Version 1809 (OS Build: 17763.134)
       12 Jun 2018 #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 ?

    Click image for larger version. 

Name:	Run sfc.PNG 
Views:	82 
Size:	43.8 KB 
ID:	192101


    Or, am I doing something else wrong ?



    Lol, OK I will do that. . . . .
    Name:  image.png
Views: 315
Size:  4.0 KB
      My ComputerSystem Spec


  2. Posts : 973
    Windows 10 Home x64 and Pro x86
       12 Jun 2018 #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
    Name:  Screenshot (298).png
Views: 308
Size:  8.0 KB
    Irrelevant bit blacked out & don't worry about the colours as they are just additional settings I have put in.

    Denis
      My ComputerSystem Spec


  3. Posts : 141
    Windows 10 Home, 64-bit, Version 1809 (OS Build: 17763.134)
       12 Jun 2018 #202

    Try3 said: View Post
    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. . .

    Name:  image.png
Views: 306
Size:  30.0 KB

    Or. . .
    Click image for larger version. 

Name:	image.png 
Views:	37 
Size:	32.1 KB 
ID:	192111


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

    Click image for larger version. 

Name:	PS sfc run.PNG 
Views:	34 
Size:	25.1 KB 
ID:	192113


    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 ComputerSystem Spec


  4. Posts : 21,460
    windows 10 professional version 1607 build 14393.969 64 bit
       12 Jun 2018 #203

    Try3 said: View Post
    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 ComputerSystem Spec


  5. Posts : 973
    Windows 10 Home x64 and Pro x86
       12 Jun 2018 #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 ComputerSystem Spec


  6. Posts : 21,460
    windows 10 professional version 1607 build 14393.969 64 bit
       12 Jun 2018 #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 ComputerSystem Spec


  7. Posts : 973
    Windows 10 Home x64 and Pro x86
       13 Jun 2018 #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 ComputerSystem Spec


  8. Posts : 21,460
    windows 10 professional version 1607 build 14393.969 64 bit
       13 Jun 2018 #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 ComputerSystem Spec


  9. Posts : 973
    Windows 10 Home x64 and Pro x86
       13 Jun 2018 #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 ComputerSystem Spec


  10. Posts : 21,460
    windows 10 professional version 1607 build 14393.969 64 bit
       13 Jun 2018 #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 ComputerSystem Spec


 
Page 21 of 22 FirstFirst ... 1119202122 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 Threads
How to Open a Command Prompt at Boot in Windows 10 A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands at the command prompt, you can perform tasks on your computer without using the...
General Tips Open Command Prompt in Windows 10 in Tutorials
A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands at the command prompt, you can perform tasks on your computer without using the Windows graphical interface. This tutorial will show...
A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands in an elevated command prompt, you can perform tasks that require administrator rights on your computer without using the Windows...
Show Us Your Command Centre in Chillout Room
This is my study. Also my office when I am working. I call it Sanctuary. 327 328
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:15.
Find Us