System Use System File Checker (SFC) to Repair System Files in Windows 11


SFC_banner.png

This tutorial will show you how to run the System File Checker (SFC) tool to repair missing, corrupted, and modified system files in Windows 10 and Windows 11.

System File Checker (SFC) is a tool built into Windows that will check for system file corruption.

The SFC /SCANNOW command scans and verifies the integrity of all protected system files and replaces missing or corrupted versions with correct versions when possible. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from the Windows image component store, and then replaces the missing or corrupted file.

Reference:


If you get a Windows Resource Protection Could Not Start the Repair Service error when trying to run SFC, make sure the Windows Modules Installer service is enabled and set to manual, and try again.



Contents





Option One

Run SFC /SCANNOW command in Windows 11


You must be signed in as an administrator to use this option.


1 Open an elevated Windows Terminal, and select Command Prompt or Windows PowerShell.

2 Copy and paste the sfc /scannow command into the elevated terminal, and press Enter. (see screenshot below)

3 When the scan is complete, hopefully you will get a Windows Resource Protection did not find any integrity violations message indicating you do not have any missing or corrupted system files.

If you get a Windows Resource Protection found corrupt files but was unable to fix some of them. type message, then:

Run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with Fast Startup turned off and restarting the computer after each time to completely fix everything it's able to.

If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the computer afterwards, and try running the sfc /scannow command again.

If still not, then do a system restore using a restore point dated before the system file problem occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could upload and attach your sfcdetails.txt file created using OPTION THREE below in a reply post in this tutorial.

If still not, then you could do a repair install of Windows 11 without losing anything.

If still not, then you could reset Windows 11.



sfc_scannow_command.png





Option Two

Run SFC /SCANNOW command in Command Prompt at Boot


1 Open a command prompt at boot.

2 Copy and paste the diskpart command into the command prompt at boot, and press Enter. (see screenshot below)

3 Copy and paste the list volume command into the command prompt at boot, and press Enter.

4 Make note of the offline boot directory (ex: recovery partition around 500 MB) drive letter (ex: "E") and Windows 11 drive letter (ex: "C").

5 Copy and paste the exit command into the command prompt at boot, and press Enter to exit diskpart.

6 Type the command below into the command prompt at boot, and press Enter.

sfc /scannow /offbootdir=<recovery partition drive letter>:\ /offwindir=<Windows drive letter>:\Windows

Substitute <recovery partition drive letter> in the command above with the offline boot directory (ex: recovery partition around 500 MB) drive letter (ex: "E") from step 4.

Substitute <Windows drive letter> in the command above with the Windows 11 drive letter (ex: "C") from step 4.

For example: sfc /scannow /offbootdir=E:\ /offwindir=C:\Windows


7 When the scan is complete, hopefully you will get a Windows Resource Protection did not find any integrity violations message indicating you do not have any missing or corrupted system files.

If you get a Windows Resource Protection found corrupt files but was unable to fix some of them. type message, then:

Run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with Fast Startup turned off and restarting the computer after each time to completely fix everything it's able to.

If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the computer afterwards, and try running the sfc /scannow command again.

If still not, then do a system restore using a restore point dated before the system file problem occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could upload and attach your sfcdetails.txt file created using OPTION THREE below in a reply post in this tutorial.

If still not, then you could do a repair install of Windows 11 without losing anything.

If still not, then you could reset Windows 11.



sfc_scannow_command_prompt_at_boot.png





Option Three

View SFC Scan Details from CBS.LOG


When SFC runs from within Windows, it logs its actions into the C:\Windows\Logs\CBS\CBS.log file with [SR] tags.

This option creates a sfcdetails.txt file on your desktop that shows you only the specific SFC details from the huge CBS.log.

SFC logging in the CBS.log file is not supported when running SFC at boot (offline) in Option Two.


1 Open Windows Terminal, and select Command Prompt or Windows PowerShell.

2 Copy and paste the appropriate command below into the terminal, and press Enter. (see screenshotd below)

(Command Prompt)​
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

SFC_scan_results_command.png

OR​

(Windows PowerShell)​
(sls [SR] $env:windir\Logs\CBS\CBS.log -s).Line >"$env:userprofile\Desktop\sfcdetails.txt"

SFC_scan_results_PowerShell.png

3 You can now close Windows Terminal if you like.

4 Open the sfcdetails.txt file created on your desktop to see only the SFC scan details from the CBS.log file.

The sfcdetails.txt file contains details from every time that the System File Checker tool has been run on the computer. The file includes information about files that were not repaired by the System File Checker tool. Verify the date and time entries to determine the problem files that were found the last time that you ran the System File Checker tool.


5 The sfcdetails.txt file uses the following format:

Date/Time SFC detail The following sample log file contains an entry for a file that could not be repaired: 2007-01-12 12:10:42, Info CSI 00000008 [SR] Cannot repair member file [l:34{17}]"Accessibility.dll" of Accessibility, Version = 6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, VersionScope neutral, PublicKeyToken = {l:8 b:b03f5f7f11d50a3a}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing


That's it,
Shawn Brink


 
Last edited:
Hi im just trying to find a way to look for my cbs logs i have checked all my drives and they are no where to be found and this this the message i got after running everything and then looking for the logs.
C:\Windows\System32> findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
The system cannot find the path specified.
This is all because i think my steelseries gg app is corrupted and i have contacted them they have took all the logs from my gg app and i have done everything in my power so far i just dont understand why i cant get to the logs to find if i do have any corrupted files and if so then i can delete them and reinstall them, just a lad looking for answers if anyone does get back thank you appreciate your time.

IMG_2746.webp
 

My Computer

System One

  • OS
    windows 11 64 bit
    Computer type
    PC/Desktop
    Manufacturer/Model
    built myself
Hi im just trying to find a way to look for my cbs logs i have checked all my drives and they are no where to be found and this this the message i got after running everything and then looking for the logs.
C:\Windows\System32> findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
The system cannot find the path specified.
This is all because i think my steelseries gg app is corrupted and i have contacted them they have took all the logs from my gg app and i have done everything in my power so far i just dont understand why i cant get to the logs to find if i do have any corrupted files and if so then i can delete them and reinstall them, just a lad looking for answers if anyone does get back thank you appreciate your time.

View attachment 127383

Hello, and welcome to the forum. :alien:

That error message is usually for the output path below in the command.

"%userprofile%\Desktop\sfcdetails.txt"

As a test, copy and paste %userprofile%\Desktop into the address bar of File Explorer and press Enter to see if it finds the path. If not, then you can use option three in the tutorial below to restore your Desktop folder.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
C:\Windows\System32> findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

I suggest you look at your Desktop in File explorer & write its full path*** into that command [instead of %userprofile%\Desktop] so you'll end up with something like
C:\Windows\System32> findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"C:\Users\Fred\FredsDesktop\sfcdetails.txt"

*** One way of getting the full path of the Desktop is to right-click on a file on the Desktop, select Properties then copy the Location entry by dragging your mouse all the way along the Loction entry text and press Ctrl-C to copy what you've selected.


Best of uck,
Denis
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Hi im just trying to find a way to look for my cbs logs



Please search for C:\WINDOWS\Logs\CBS\CBS.log > post a share link


These are some scripts > see if they can run / complete

Also run: Tuneup plus

a) https://www.tenforums.com/attachmen...-files-use-bsod-debugging-tuneup_plus_log.zip



b) https://www.tenforums.com/attachmen...atch-files-use-bsod-debugging-sfcfromfile.bat

 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    Motherboard
    Product : 190A Version : KBC Version 94.56
    Memory
    16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
    Graphics Card(s)
    NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
    Sound Card
    IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
    Hard Drives
    Model Hitachi HTS727575A9E364
    Antivirus
    Microsoft Defender
    Other Info
    Mobile Workstation
It occurs to me that this might be informative. At a command prompt, execute this:

set >"Q:\Useful Files\Environment Variables.txt"

Now, maybe you don't have a Q-drive. Pick a drive letter that you actually have. Maybe you don't have a directory named "Useful Files" on your Q-drive. Pick a directory you do have on a drive you do have. In the end, that command will capture the output of your set command in a file named "Environment Variables.txt" in whatever directory you have chosen. I show quotation marks in my example because there are blanks in the file specification. You can omit the quotation marks if you choose a directory path & a file name in which there are no blanks. And even if there are no blanks, surrounding the file specification in quotation marks is probably a good habit to get into. Attach that file to a post here & maybe somebody will be able to notice something strange about it.
 

My Computer

System One

  • OS
    Windows 11 Pro 64-bit 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Intel Core i9-13900K
    Motherboard
    ASUS Z790-Plus WiFi TUF Gaming
    Memory
    4x32G Teamgroup TForce Vulcan DDR5 6000 DIMMs
    Graphics Card(s)
    MSI/NVidia GeForce RTX 4070 Gaming X Trio 12G GDDR6X + built into motherboard Intel UHD Graphics
    Sound Card
    Built into graphics card + built into motherboard Realtek Audio
    Monitor(s) Displays
    Both connected to the NVidia adapter - Primary: Dell SE2417HGX 23" diagonal connected via HDMI-to-DisplayPort dongle, Secondary: Toshiba TV 32" diagonal connected via HDMI through Onkyo TX-NR717 surround receiver
    Screen Resolution
    1920x1080 on each monitor
    Hard Drives
    Samsung 970 EVO Plus NVMe M.2 2T
    6xSATA-to-USB 3.0 Fideco external enclosures holding SATA drives of various brands & sizes 1x20T, 2x18T, 2x6T, 1x500G, all connected to a multi-port USB hub
    For backups: USB 3.0 HDDs of various brands & sizes 3x20T, 1x1T + SSDs of various brands & sizes 2x480G, 1x1T, all connected to another multi-port USB hub, powered on only while actually performing backups & (may it never happen) restores
    PSU
    MSI MPG A1000G PCIe5 1000W, TrippLite Smart1500TSU 1200W UPS for the main system, TrippLite ECO850LCD 850W UPS for the DASD & my Internet connectivity boxes (no reason to throw out legacy equipment that stil works fine)
    Case
    Fractal North
    Cooling
    DeepCool AK620 CPU cooler (air, 2 fans), 2 case fans, 1 fan in PSU, 3 fans in graphics adapter; 4xpersonal cooling fans strategically placed to cool the external HDDs
    Keyboard
    Cherry MX 11900 USB (wired)
    Mouse
    Touchpad built into the keyboard
    Internet Speed
    500Mbps via Spectrum cable TV/cell phone bundle
    Browser
    Firefox
    Antivirus
    Built into Windows 11
    Other Info
    The ethernet adapter integrated into the motherboard died. I am now using a TPLink TX201 ethernet adapter in a PCIe expansion slot for Internet connectivity.
By the way, to follow up my posts earlier in this thread, it turned out I had 4 DIMMs of 32G each go bad. I suspect there was something fishy about the LEDs on the spines of the DIMMs. I have replaced all 4 DIMMs with DIMMs that do not have LEDs on them. In addition, I had to change some settings in my BIOS so that instead of auto-detecting my HDDs, I told it straight up that they were HDDs. Plus I updated my BIOS, my video drivers, & some other things I got from the ASUS web site. (I have an ASUS motherboard.) Now everything is rock stable. No more BSODs. I reboot the system only when Microsoft pushes out one of those big updates on an Update Tuesday, or when one of my applications updates something that requires a reboot (probably because it updated a Service).
 

My Computer

System One

  • OS
    Windows 11 Pro 64-bit 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Intel Core i9-13900K
    Motherboard
    ASUS Z790-Plus WiFi TUF Gaming
    Memory
    4x32G Teamgroup TForce Vulcan DDR5 6000 DIMMs
    Graphics Card(s)
    MSI/NVidia GeForce RTX 4070 Gaming X Trio 12G GDDR6X + built into motherboard Intel UHD Graphics
    Sound Card
    Built into graphics card + built into motherboard Realtek Audio
    Monitor(s) Displays
    Both connected to the NVidia adapter - Primary: Dell SE2417HGX 23" diagonal connected via HDMI-to-DisplayPort dongle, Secondary: Toshiba TV 32" diagonal connected via HDMI through Onkyo TX-NR717 surround receiver
    Screen Resolution
    1920x1080 on each monitor
    Hard Drives
    Samsung 970 EVO Plus NVMe M.2 2T
    6xSATA-to-USB 3.0 Fideco external enclosures holding SATA drives of various brands & sizes 1x20T, 2x18T, 2x6T, 1x500G, all connected to a multi-port USB hub
    For backups: USB 3.0 HDDs of various brands & sizes 3x20T, 1x1T + SSDs of various brands & sizes 2x480G, 1x1T, all connected to another multi-port USB hub, powered on only while actually performing backups & (may it never happen) restores
    PSU
    MSI MPG A1000G PCIe5 1000W, TrippLite Smart1500TSU 1200W UPS for the main system, TrippLite ECO850LCD 850W UPS for the DASD & my Internet connectivity boxes (no reason to throw out legacy equipment that stil works fine)
    Case
    Fractal North
    Cooling
    DeepCool AK620 CPU cooler (air, 2 fans), 2 case fans, 1 fan in PSU, 3 fans in graphics adapter; 4xpersonal cooling fans strategically placed to cool the external HDDs
    Keyboard
    Cherry MX 11900 USB (wired)
    Mouse
    Touchpad built into the keyboard
    Internet Speed
    500Mbps via Spectrum cable TV/cell phone bundle
    Browser
    Firefox
    Antivirus
    Built into Windows 11
    Other Info
    The ethernet adapter integrated into the motherboard died. I am now using a TPLink TX201 ethernet adapter in a PCIe expansion slot for Internet connectivity.

Latest Tutorials

Back
Top Bottom