SFC /SCANNOW Command - System File Checker

How to Repair Windows 7 System Files with System File Checker


   Information
The sfc /scannow command (System File Checker) scans the integrity of all protected Windows 7 system files and replaces incorrect corrupted, changed/modified, or damaged versions with the correct versions if possible.

   Tip
If you get the Windows Resource Protection Could Not Start the Repair Service error when trying to run SFC, then make sure that the Windows Modules Installer service is enabled, click on Start, and set to Manual.

Services - Start or Disable

OR

Copy and paste the command below in the elevated command prompt, and press Enter. After the Windows Modules Installer service has started, try running the SFC command again

net start trustedinstaller

   Note
The KB3022345, KB3035583, and KB3068708 updates will cause SFC to give you a false mismatch message in SFC for files related to these updates.

You can safely ignore these results in your SFC details since it will not affect SFC from being able to repair other system files.

   Warning
Be aware that if you have modified your system files as in theming explorer/system files, running sfc /scannow will revert the system files such as explorer.exe back to it's default state. Make the appropriate backups of your system files that you have modified for theming if you wish to save them before running sfc /scannow.



:note: For the updated Windows 10 tutorial, please see - SFC Command - Run in Windows 10 - Windows 10 Tutorials

CONTENTS:
  • Option One: To Run the SFC /SCANNOW Command at Boot
  • Option Two: To Run the SFC /SCANNOW Command in Windows 7
  • Option Three: How to See and Read Only the "SFC" Scan Results from the CBS.LOG



OPTION ONE

To Run the SFC /SCANNOW Command at Boot


1. For how, see METHOD TWO at this link: SFC /SCANNOW : Run in Command Prompt at Boot

   Note
Using OPTION TWO below is recommended if able.

If you would like to get help with your SFC issue, then be sure to upload and attach your sfcdetails.txt file from OPTION THREE below in your post.





OPTION TWO

To Run the SFC /SCANNOW Command in Windows 7


1. Open an elevated command prompt or an elevated PowerShell, and do step 2 or 3 below for what type of scan you would like to run.


2. To Scan and Repair System Files
NOTE: Scans the integrity of all protected system files and repairs the system files if needed. Please see red WARNING box at the top of this tutorial.
A) In the elevated command prompt, type sfc /scannow, press Enter, and go to step 4 below. (see screenshot below)
NOTE: This may take a little bit to finish.

Command-1.jpg
3. To Only Verify if the System Files are Corrupted
NOTE: Scans and only verifies the integrity of all proteced system files only. This command will not change your system files as in the red WARNING box at the top of this tutorial.
A) In the elevated command prompt, type sfc /verifyonly, press Enter, and go to step 4 below.
4. When the scan is complete, hopefully you will see all is ok like the screenshot below.

   Note

  • If SFC could not fix something, 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 3 or more times to completely fix everything that it's able to.
  • If not, then download and run the 32-bit (x86) or 64-bit (x64) System Update Readiness Tool for your same installed 32-bit or 64-bit Windows 7, restart the PC afterwards, and try the sfc /scannow command again.
  • If still not, then try using OPTION ONE above to run the sfc /scannow command at boot.
  • If still not, then you can attempt to run a System Restore using a restore point dated before the bad file occured 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, then you can use the steps in the TIP box in the OPTION THREE section below to manually replace the files that SFC could not fix if there are not to many fix.
  • If there are to many files to manually fix, or you prefer not to use OPTION THREE below, then you could do a repair install without losing anything.
If you would like to get help with your SFC issue, then be sure to upload and attach your sfcdetails.txt file from OPTION THREE below in your post.


Finished.jpg
5. When done, close the elevated command prompt.



OPTION THREE

How to See and Read Only the "SFC" Scan Results from the CBS.LOG



   Note
When SFC runs, it logs it's actions into the C:\Windows\Logs\CBS\CBS.log. The steps in this option will show you how to see only the specific SFC entries with the [SR] tags in this CBS.log. This can be helpful to show you what files SFC could not fix automatically if you wanted to try and manually replace them.

1. Open an "elevated command prompt" (right click -> Run as administrator).

2. In the elevated command prompt, copy and paste the command below, and press Enter. (See screenshot below)
NOTE: This will place a sfcdetails.txt file on your desktop with only the SFC scan result details from the CBS.LOG in it.
Code:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
sfcdetails.jpg
3. Close the elevated command prompt.

4. Open the sfcdetails.txt file on your desktop to see the SFC scan details in the CBS.LOG.

5. You can safely delete the sfcdetails.txt file afterwards if you like.
   Tip
If you need to replace a corrupted system file that SFC cannot fix, then this will show you how to by extracting a new copy directly from your Windows 7 installation DVD.

Extract Files from Windows 7 Installation DVD





That's it,
Shawn









 
Last edited:
would it be a bad Idea to make a task to run this each night? not sure if it would be a good Idea or not. Hit me back
 

My Computer

OS
Windows 7 Build 7000
Thanks, I forgot about this. I used to use it in early editions of windows. Run it and sorted some errors.
 

My Computer

Computer Manufacturer/Model Number
Dilithium Computers/Engineering (Myself) Star date 42.739285.5432.9
OS
Win7 Ultimate x64 on Desktop / Win7 Ultimate x86 on laptop / Win7 x86 Starter on Netbook
CPU
AMD Phenom 965 X4 3.4Ghz cpu Black Edition
Motherboard
Gigabyte 790XT
Memory
12 Gb DDR3
Graphics Card(s)
Nvidea Gforce GTX 470
Sound Card
Onboard Realtek hi-fi
Monitor(s) Displays
Lg 3D led 23"
Screen Resolution
1920x1080
Hard Drives
Loads maxstore sata 1 & 2/ loads of partitions + 1Tb Hitachi sata 2. 256Gb Crucial ssd.
PSU
OCZ 700W GameXstream
Case
Artec 10000
Cooling
On board + many case fans
Keyboard
Logitech wireless K350
Mouse
Inferno gaming mouse
Internet Speed
Talk talk. 10Mb
Other Info
My PC was hand built with matchsticks. xbox 360 controller. Printers,fax.........
would it be a bad Idea to make a task to run this each night? not sure if it would be a good Idea or not. Hit me back

you shouldnt have any problem with it...
 

My Computer

Computer Manufacturer/Model Number
Tx2500z Tablet Pc/Homemade Server
OS
Windows 7 Ult x64(x2), HomePrem x32(x4), Server 08 (+VM), 08 R2 (VM) , SuSe 11.2 (VM), XP 32 (VM)
CPU
Turion X2 ultra (oh well came with laptop)/P4 @3.2 (yes P4)
Motherboard
IDK HP Motherboard / Intel DG965SS
Memory
OCZ Dual Channel 4GB kit/ 1gb Dual Channel
Graphics Card(s)
HD 3200 graphics /GMA x3100 (yay for intergrated!!)
Sound Card
Realtek HD Audio(mic working, well sort of)/Siig IC-70012
Monitor(s) Displays
built-in Hp 12" laptop screen/ Acer 19"
Screen Resolution
1280x800 /1440x900
Cooling
All Air Cooled
Mouse
Logi MX Rev. /MS Wheel Optical 1.1A /Logitech Optical Mouse
Internet Speed
College baby but its still routed through vpn to 1536k...
Other Info
love my wacom pen and pressure sensitivity...
wished it worked in 7, SUSE for that matter though
Thanks, I forgot about this. I used to use it in early editions of windows. Run it and sorted some errors.

You're welcome Romulinx2. :)

Shawn
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Very useful information running the sfc atm, thank you for this thread.:geek:
 

My Computer

Computer Manufacturer/Model Number
Self-Build
OS
Windows 7 RC 7100
CPU
Intel c2q6600 oc'd @4239Mhz 1.68v w/mod'd VapoChill LS
Motherboard
Asus Rampage Extreme
Memory
2gb Ocz Flex II DDR3 2000 8-8-8-24 2.2v
Graphics Card(s)
2x Asus 3870x2 Tops in quad xfire
Sound Card
Asus SupremeFX X-FI
Monitor(s) Displays
1-HP 2408 24'' LCD & 1-Viewsonic VG2230wm 22'' LCD
Screen Resolution
1920x1200 & 1600x1200
Hard Drives
2x WD Caviar 160gb in Raid0
1x 1TB backup

Opticals:

Sony optical drive
Samsung optical drive
PSU
1x Apevia 680watt & 1x Logisys 550watt
Case
2x Custom Plexiglass cases 1-PC & 1- LS Phase Change
Cooling
Aqua Computer 360xt single loop north/south & Flex II DDR3
Keyboard
Logitech Di Novo Edge Keyboard & Optimus Mini 3 Keyboard
Mouse
Saitek Obsidian mouse & 3D Connexion Space Pilot 3D mouse
Internet Speed
not worth mentioning
Other Info
Upek Fingerprint reader
Plantronic 590 Bluetooth headset
HP 7550 Photo Printer
HP 4670 See-Thru Scanner
NextEngine 3D Scanner
Enzotech north, south and mosfet blocks, 4xDanger Den Maze-5 vga blocks, //UPGRADES COMING SOON//
Koolance liquid-cooled psu, i7 975, Rampage II Extreme
You're welcome Thunder2008. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Good to see this again.
Thanks for the reminder.

Didn't you used to put some letters/codes as a suffix, something such as /* or /?. This was to fix things.
 

My Computer

OS
Dual boot XP Pro and Seven/7127
Hello Anykey,

You could type sfc /? in the elevated command prompt for a complete list of sfc commands to use, but sfc /scannow is the best option to scan and repair all protected system files command. No other suffixes that I know of though. :)

sfc_list.jpg
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Thanks Brink, perhaps I am thinking of the old chkdsk.
I was always taught to do it something like this:

chkdsk /f /r /v /e
 

My Computer

OS
Dual boot XP Pro and Seven/7127
Yeah, that would for chkdsk then. ;)

Not sure the /e extension is available in Vista or Windows 7 or what it is for though.

chkdsk.jpg
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
i have a couple of problems with SFC ...

1) when i run it from a Admin Command Prompt from within Windows the program runs ok and finds errors (windows Media Player i think), but it says "Windows Resource Protection found corrupt files but was unable to fix some of them.
Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example" ... which is just double dutch to me.

2) When i try and run it from the command prompt when booting from the System repair disk i get the error: SFC has a repair pending, please re-boot to finish the repair (or something like that) and when i reboot and try again i still get the same error. this also happens when i boot from hard disk and press F8 and choose repair from the boot menu.

either way i cant repair the system files ... any ideas?
 

My Computer

Computer Manufacturer/Model Number
Toshiba Satelite
OS
windows 7 RTM
CPU
AMD Athlon x 2 64
Memory
4gb
Hi, did you try a fresh install, it may sort your problem out.
 

My Computer

Computer Manufacturer/Model Number
Self Build 64bit
OS
Vista Ult64, Win7600
CPU
Intel Core 2 Quad Q6600 @ 2400 MHz 64bit OS
Motherboard
Asus P5E3 Deluxe WiFi @p 64 bit OS
Memory
4096 MB DDR3-SDRAM
Graphics Card(s)
ATI Radeon HD 3870 Series x2 Crossfired
Sound Card
Realtek on board
Monitor(s) Displays
Samsung SyncMaster - 23 inches
Screen Resolution
1680x1050 pixels at 60 Hz in True Colors
Hard Drives
Hitachi (250 GB)/Samsung 750 GB. /Barracuda 160 GB.
My Book 1 TB external..
PSU
Cooler Master 1000w
Case
Cooler Master Cosmos 1000.
Cooling
Fans and fresh air,
Keyboard
Wireless
Mouse
Wireless
Internet Speed
Never fast enough
Other Info
I use a Magnum.
i have a couple of problems with SFC ...

1) when i run it from a Admin Command Prompt from within Windows the program runs ok and finds errors (windows Media Player i think), but it says "Windows Resource Protection found corrupt files but was unable to fix some of them.
Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example" ... which is just double dutch to me.

2) When i try and run it from the command prompt when booting from the System repair disk i get the error: SFC has a repair pending, please re-boot to finish the repair (or something like that) and when i reboot and try again i still get the same error. this also happens when i boot from hard disk and press F8 and choose repair from the boot menu.

either way i cant repair the system files ... any ideas?

BM

SFC verifies the system files and fixes those it can fix. If there is a corrupt file , or a missing file that isnt in the stored files it cant replace it. If you view the cbs.log file it will tell you which and if you have troubles upload it to us and we will give you a hand.

In the final analysis jfar is right. A clean install is going to be the fastest easiest way to get rid of all the problems.
Is there something on this drive which you cannot live without?

Ken
 

My Computer

Computer Manufacturer/Model Number
HP Pavillion dv-7 1005 Tx
OS
Win 8 Release candidate 8400
CPU
[email protected]
Memory
4 gigs
Graphics Card(s)
Nvidia 9600M
Sound Card
HD built-in
Monitor(s) Displays
17" Wxga
Screen Resolution
1440x900
Cooling
none
Internet Speed
45Mb down 5Mb up
i have a couple of problems with SFC ...

1) when i run it from a Admin Command Prompt from within Windows the program runs ok and finds errors (windows Media Player i think), but it says "Windows Resource Protection found corrupt files but was unable to fix some of them.
Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example" ... which is just double dutch to me.

2) When i try and run it from the command prompt when booting from the System repair disk i get the error: SFC has a repair pending, please re-boot to finish the repair (or something like that) and when i reboot and try again i still get the same error. this also happens when i boot from hard disk and press F8 and choose repair from the boot menu.

either way i cant repair the system files ... any ideas?

BM

SFC verifies the system files and fixes those it can fix. If there is a corrupt file , or a missing file that isnt in the stored files it cant replace it. If you view the cbs.log file it will tell you which and if you have troubles upload it to us and we will give you a hand.

In the final analysis jfar is right. A clean install is going to be the fastest easiest way to get rid of all the problems.
Is there something on this drive which you cannot live without?

Ken

hi guys. i would rather not do a clean install as its taken me a few weeks to get Windows 7 just as i like it and would hate to start all over again.

i have attached the latest CBS.LOG here. Hope you can make some sense of it lol.

thanks again for your help.
 

My Computer

Computer Manufacturer/Model Number
Toshiba Satelite
OS
windows 7 RTM
CPU
AMD Athlon x 2 64
Memory
4gb
what was wrong with the simple goto run then sfc /scannow and place the windows disc in the drive or can that not be done in w7, helped fix quiet a bit in xp & w98 days.
 

My Computer

Computer Manufacturer/Model Number
self build
OS
vista xp w7
CPU
ci920 quad core
Motherboard
msi x58
Memory
3gb ddr3
Graphics Card(s)
ati hd4350
Sound Card
ati hd4350
Monitor(s) Displays
samsung t240hd
Hard Drives
sata2 c drive
ide backups
PSU
700
Case
no name
Cooling
standard intel cpu fan
Hello Sunny,

It is no longer required to have to insert the installation disc since the system files are stored within Windows 7 and Vista to replace the corrupted ones with. That's all. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Brink

thanks did not know that, can you still run it from the run box?
 

My Computer

Computer Manufacturer/Model Number
self build
OS
vista xp w7
CPU
ci920 quad core
Motherboard
msi x58
Memory
3gb ddr3
Graphics Card(s)
ati hd4350
Sound Card
ati hd4350
Monitor(s) Displays
samsung t240hd
Hard Drives
sata2 c drive
ide backups
PSU
700
Case
no name
Cooling
standard intel cpu fan
Sorry, but no. It needs to run through a elevated (run as administrator) command prompt instead.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
brink

thanks
 

My Computer

Computer Manufacturer/Model Number
self build
OS
vista xp w7
CPU
ci920 quad core
Motherboard
msi x58
Memory
3gb ddr3
Graphics Card(s)
ati hd4350
Sound Card
ati hd4350
Monitor(s) Displays
samsung t240hd
Hard Drives
sata2 c drive
ide backups
PSU
700
Case
no name
Cooling
standard intel cpu fan
Back
Top