Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home » Windows

How to Use SFC /Scannow Command

Abhishek SilwalBy Abhishek SilwalApril 21, 2023
sfc-scannow-command

The System File Checker (SFC) program is the traditional Windows utility you can use to repair corrupt system files. It scans for any corruption or integrity issues with the protected files in your Windows system and attempts to repair them. 

You need to append the Scannow switch on the SFC Command to check for and fix such issues. However, there are other things you need to consider as well. 

For instance, just running the default Command Prompt may not execute this command. Sometimes, you will also need to repair your files without logging in to your account. So, I will explain how you can run this command in all situations in this article.

Working Mechanism of SFC /Scannow

sfc-commands

Before Windows Vista, System File Checker would use the cached copy of the system files in a compressed folder inside the %WinDir%\System32\dllcache directory for scanning and repairing corrupt system files.

Now, however, Microsoft integrated SFC inside the Windows Resource Protection (WRP) feature. This feature prevents outside sources from replacing the crucial built-in system files and registry data.

Whenever you run SFC /Scannow, Windows Resource Protection performs the following operations to scan and repair the protected files:

  • First, it checks the hash signature of the files and compares it with the registry entries in the COMPONENTS registry hive to see if they are in the proper location.
  • The system files are hard-linked to the components inside the WinSxS folder. Only the files inside the folder actually exist, and the usual system files simply link to these components. So, if WRP finds inconsistencies, it checks system files against the contents of the %WinDir%\WinSxS or %WinDir%\WinSxS\Backup folders (Windows Component Store).
  • It looks out for all broken hard links and repairs them. This way, it recreates all missing or corrupt files in their proper location.

How to Use SFC /Scannow on Online Windows?

You can use the Elevated or Admin-level Command Prompt to run the SFC utility in an Online system. Here, online refers to the Windows environment you are currently using. That is to say, if you are logged in inside a Windows user account, your Windows is online.

  1. Open Run by pressing Windows key + R.
  2. Type cmd and press Shift + Ctrl + Enter to run the Command Prompt as admin.
  3. If you only want to verify system file integrity, you can type sfc /verifyonly and press Enter.
  4. To scan and repair all file integrity issues, type sfc /scannow and press Enter.
    sfc-scannow-verifyonly

If it did not find any issues, it would return the message “Windows Resource Protection did not find any integrity violations.”

If it found the issues and successfully resolved them, you will get “Windows Resource Protection found corrupt files and successfully repaired them.”

But there are two situations where it does not provide the desired result:

  • If WRP fails to resolve the issue, it gives the “Windows Resource Protection found corrupt files but was unable to fix some of them” error message.
    You can usually resolve this issue by running the command DISM /Online /Cleanup-Image /RestoreHealth and then sfc /scannow
  • In some cases, WRP can’t run or scan the files. In such scenarios, running SFC gives the “Windows Resource Protection Could Not Perform the Requested Operation” error message.

It also creates a log file, %windir%\Logs\CBS\CBS.log, which includes the details on the process.

You can check the log by entering the command findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt" on Prompt to create a readable .txt file on your Desktop.

How to Use SFC /Scannow on Offline Windows?

You may need to run SFC /Scannow on an offline Windows environment in some scenarios. If you are unable to log in to your account or if you have a multi-boot system, the program may not find the OS you wish to repair.

You can boot into the Advanced Startup or Windows Recovery environment and then run this program in such cases. 

You will need to specify the offline Windows and the boot directory for this method. Also, the recovery environment temporarily reassigns the drive letter for these directories, so you need to figure them out as well.

  1. First, you need to get to the Advanced Startup Environment. There are various methods to do so, such as:
    • Force shutdown your computer three or four times and then power it up again. On the fourth boot, the computer will load the Startup Repair screen. Here, click Advanced options.
    • Click on the power icon on the login screen or start menu. Press and hold Shift key while clicking Restart > Restart Now.
    • Boot using a Windows installation media. Set the language preferences, and on the Install screen, select Repair your computer.
  2. Then, go to Troubleshoot > Advanced Options > Command Prompt.
    command-prompt-in-WRE
  3. Type bcdedit and press Enter.
  4. Note the following parameters under Windows Boot Loader:
    • device
    • osdevice
    • systemroot
      windows-boot-loader-device-osdevice-systemroot
  5. Enter the command below while replacing the values from the parameters:
    sfc /scannow /offbootdir=“device drive letter” /offwindir=“osdevice drive letter\systemroot”

    For instance, sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
    sfc-scannow-offbootdir-offwindir
how-to
Abhishek Silwal
  • LinkedIn

Abhishek Silwal is an Electronics Engineer and a technical writer at TechNewsToday. He specializes in troubleshooting a wide range of computer-related issues. His educational background in Electronics Engineering has given him a solid foundation in understanding of computers. He is also proficient in several programming languages and has worked on various robotics projects. Even in his early days, he used to tinker with various computer components, both hardware, and software, to satiate his curiosity. This experience has given him a breadth of experience that goes beyond his educational qualification. Abhishek has been writing articles on dealing with varieties of technical issues and performing specific tasks, especially on a Windows machine. He strives to create comprehensive guides on fixing many system and hardware issues and help others solve their problems. You can contact him at abhisheksilwal@technewtoday.com

Related Posts

how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 22, 2023
what happens if you turn off your computer during an update

What Happens if You Turn Off Your Computer During an Update?

September 18, 2023
How to Disable Integrated Graphics

How to Disable Integrated Graphics?

September 16, 2023
System Restore Stuck

How To Fix Windows Stuck on System Restore

September 16, 2023
startup-repair-couldn't-repair-your-pc

How To Fix “Startup Repair Couldn’t Repair Your PC”

September 13, 2023
how to free up ram

How to Free Up Memory

August 4, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 22, 2023
motherboard chipset

Understanding Motherboard Chipset and Its Importance

September 20, 2023
Naval-Warfare-Games

Best Naval Warfare Games

September 18, 2023
You may also like
printer-not-printing

How to Fix a Printer That’s Not Printing

September 20, 2023
Share Location With Friends and Family

Share Location With Friends and Family (iPhone and Android)

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.