What is the System File Checker (SFC) for Windows?


When you have a computer that won’t start or maybe even a black screen on your computer, using the system file checker can be a handy tool indeed. I have been saved many times by this Windows system tool.

What is the System File Checker (SFC)?

System File Checker gives an administrator the ability to scan all protected files to verify their versions. If System File Checker discovers that a protected file has been overwritten, it retrieves the correct version of the file from the cache folder (%Systemroot%\System32\Dllcache) or the Windows installation source files, and then replaces the incorrect file. System File Checker also checks and repopulates the cache folder.
You must be logged on as an administrator or as a member of the Administrators group to run System File Checker. If the cache folder becomes damaged or unusable, you can use the sfc /scannow, the sfc /scanonce, or the sfc /scanboot commands to repair its contents.

What commands Can We Use With SFC?

You can see the command switches yourself by opening a CMD window and typing in Sfc /? See the screenshot below for more details. these switches allow you to perform a different action.
Sfc [/Scannow] [/Scanonce] [/Scanboot] [/Revert] [/Purgecache] [/Cachesize=x]
  • /Scannow: Scans all protected system files immediately and replaces incorrect versions with correct Microsoft versions. This command may require access to the Windows installation source files.
  • /Scanonce: Scans all protected system files one time when you restart your computer. This command may require access to the Windows installation source files when you restart the computer. The SfcScan DWORD value is set to 2 in the following registry key when you run this command:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  • /Scanboot: Scans all protected system files every time you start your computer. This command may require access to the Windows installation source files every time you start your computer. The SfcScan DWORD value is set to 1 in the following registry key when you run this command:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  • /Revert: Returns scan to the default setting (do not scan protected files when you start the computer).The default cache size is not reset when you run this command. This command is equivalent to the /Enable switch in Windows 2000.
  • /Purgecache: Purges the file cache and scans all protected system files immediately. This command may require access to the Windows installation source files.
  • /Cachesize=x: Sets the file cache size to x megabytes (MB). The default size of the cache is 50 MB. This command requires you to restart the computer, and then run the /purgecache command to adjust the size of the on-disk cache. This command sets the SfcQuota DWORD value to x in the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
sfc-3
The most common SFC command is the SFC / scannow which will scan and verify the versions of all protected system files after you restart your computer.

How to Run the System File Checker SFC /SCANNOW Command For Windows XP

If you are using Windows XP, to run the system file checker you will need the Windows installation cd. Otherwise you need to locate a directory on your computer named the i386. This directory is sometimes hidden or just does not exist.
  1. Insert your operating system cd in your drive.
  2. Go to the Start menu and choose run from the menu.
  3. When the Run box appears type in sfc /scannow.

How to Run the System File Checker SFC /SCANNOW Command For Windows Vista and Windows Seven +

If you run the system file checker (SFC) in Windows Vista or Windows Seven you do not need the operation disc. Simply run cmd as an administrator and type in the sfc /scannow command (System File Checker). Then it will scan the integrity of all protected Windows system files and replaces incorrect corrupted, changed/modified, or damaged versions with the correct versions if possible.
SFC / SCANNOW in dos command
  1. If the %systemroot%\system32\dllcache folder becomes corrupt or unusable, use sfc /scannowsfc /scanonce, or sfc /scanboot to repair the contents of the Dllcache directory. See the above switches for more information.
  2. You must be logged in as an Administrator to run the sfc command.
  3. If sfc discovers that a protected file has been overwritten, it retrieves the correct version of the file from the %systemroot%\system32\dllcache folder, and then replaces the incorrect file.
  4.  If you have modified your system files as in theming explorer/system files, using the sfc /scannow command will revert the system files such as explorer.exe back to it’s default state. Cool but not cool when you have spent a lot of time on customizing your computer.

How to See the Results of the SFC / SCANNOW Command

After the SFC / scannow command has finished it will create a log file. This is a simple text file with the results of the scan.
1. Go to the start menu and choose computer. 
2. In the search box type in cbs.log.
SFC / SCANNOW log file

You can also paste this text into the dos command window to see the results on your desktop.
findstr /c:”[SR]” %windir%\logs\cbs\cbs.log >> “%userprofile%\desktop\sfcdetails.txt”
To paste this string you must first copy it, then right click in the cmd window and select paste from the menu.

No comments:

Post a Comment