Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: SFC /SCANNOW : Run in Command Prompt at Boot


SFC /SCANNOW : Run in Command Prompt at Boot

How to Run the System File Checker in a Command Prompt at Boot
Published by Bare Foot Kid
23 Jan 2011
Published by

How to Check / Repair the Windows System Files from a Command Prompt at Boot

This shows how to start the PC and open a command prompt at boot so the Windows system files can be checked and repaired if possible, if the PC will not start to Windows normally or in safe mode.

Note   Note

For those that are dual/multi booting or if the Windows Recovery Environment (WinRE) does not 'see' the Windows Operating System needing repair, see Method Two below.


Let's get started!

In the BIOS set the boot order to boot first from the CD/DVD Drive, insert the Windows full version installation DVD or a created repair CD and restart the PC.



Method One

For Windows 7 and Vista full version installation media, after the "Press any key ... " black screen do steps #1 & #2 then skip down to step #5 below to continue.

For a Windows system repair disk start at step #3 below.

1) At the Select Language screen click next.
click any image to enlarge
Name:  Language.jpg
Views: 360197
Size:  131.1 KB
2) At the next screen click Repair your Computer.
Name:  Repair.jpg
Views: 364470
Size:  115.3 KB
3) For a Windows created repair CD, after the "Press any key ... " black screen there will be a Loading Files screen.
-loadind.jpg
4) Then click Next for this System Recovery Options dialog box.
Name:  Recovery.jpg
Views: 358979
Size:  34.6 KB
5) At this System Recovery Options dialog box, make sure there is a dot at "Use Recovery Tools" and be sure to make note of the Location drive letter as it probably will not be C: and the correct drive letter must be entered in the following steps; then click Next.
Name:  Letter.jpg
Views: 360016
Size:  73.5 KB
6) At this System Recovery Options dialog box click Command Prompt.
Name:  Command.jpg
Views: 358258
Size:  89.2 KB
7) In the command window that opens type this command below and hit the <enter> key, be sure to use your drive letter, where mine is F: for this demonstration yours probably will not be the same.

Code:
 
sfc /scannow /offbootdir=f:\ /offwindir=f:\windows
Name:  Type.jpg
Views: 366712
Size:  48.8 KB
8) You will get a blinking curser while it checks and attempts to repair any issues it may find, it could take quite a bit of time to complete.
Name:  Type2.jpg
Views: 361690
Size:  67.5 KB
9) To close the command window after the scan type exit and hit the <enter> key.
Name:  Type3.jpg
Views: 361503
Size:  72.8 KB
Though my demonstration / test found no errors to repair, yours may and if it does it may take you running this command a couple separate times to completely repair any issues it finds so don't give up after just one attempt.

For further important information on this process, see Option Two of this tutorial at the link below.

SFC /SCANNOW Command - System File Checker

10) To restart the PC when the command window closes, remove the Windows / repair disk from the ODD and click Restart in the System Recovery Options dialog box that's still open.
Name:  Restart.jpg
Views: 356831
Size:  89.3 KB
Method Two

It has been suggested by Brink to include this method for those dual/multi booting and for those that have issues with WinRE 'seeing' the Windows Operating System partition needing repair.

In the BIOS set the boot order to boot first from the CD/DVD Drive, insert the Windows full version installation DVD or a created repair CD and restart the PC so diskpart can be started, if need be, view this tutorial for those methods.

How to Boot to DISKPART at PC Startup

1) In the diskpart command window type list volume and hit the <enter> key.

2) After it lists the volumes type exit a single time and <enter>.
ckick to enlarge
Name:  DISKPARTSources2.jpg
Views: 365947
Size:  118.7 KB
3) Now type the command below using your specific volume drive letters <enter>.

If you are dual/multi booting or have a System Reserved partition as I do and the system boot files are stored on a separate partition than the Operating System partition needing repair, in any case, the volume drive letter where the system boot files are stored goes in the first part.

offbootdir=c:

In the second part you would use the volume drive letter for the Windows OS partition you want to attempt the repair on.

offwindir=f:

Code:
 
sfc /scannow /offbootdir=c:\ /offwindir=f:\windows
4) You will get a blinking curser while it checks and attempts to repair any issues it may find, it could take quite a bit of time to complete.
Name:  DISKPARTscan.jpg
Views: 360908
Size:  140.5 KB
5) Though my demonstration / test found no errors to repair, yours may and if it does it may take you running this command a couple separate times to completely repair any issues it finds so don't give up after just one attempt.

For further important information on this process, see Option Two of this tutorial at the link below.

SFC /SCANNOW Command - System File Checker
Name:  DISKPARTexit.jpg
Views: 362221
Size:  142.7 KB
6) To close the command window after the scan type exit and hit the <enter> key.
Then remove the Windows disk from the ODD and restart the PC to start Windows.


Enjoy






23 Jan 2011   #1
jfar

Vista Ult64, Win7600
 
 

Very well done, informative and easy to follow instructions, as usual BFK,


My System SpecsSystem Spec
23 Jan 2011   #2
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Thank you Jim!
My System SpecsSystem Spec
23 Jan 2011   #3
derekimo

Microsoft Community Contributor Award Recipient

 
 

Well done Ted, another excellent tutorial!
My System SpecsSystem Spec
.

23 Jan 2011   #4
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Thank you Derek, I still have some additions to add, Brink has made an excellent suggestion; I'll post in the thread at chillout when I finish working them out.
My System SpecsSystem Spec
23 Jan 2011   #5
niemiro

Vista Home Premium x86 SP2
 
 

Hello!

Excellent work! You might also want to reference this: You cannot use the System File Checker tool to verify or to repair Windows Vista if Windows Vista is in a mounted image file or in a bootable WIM file

Possibly? Your decision. This one is really for the Techs. If they understand it, it might matter to them. If they don't understand it, then less likely. A small reference would be enough. I also think that this error can be generated if you run chkdsk too soon before SFC. Often a few restarts are required. Can someone confirm all of this? I think it is right, but I am right on the very edge of my comfort zone.

Richard
My System SpecsSystem Spec
23 Jan 2011   #6
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Hello Richard.



Thank you very much.

It's still a work in-progress so I will look into your information.
My System SpecsSystem Spec
24 Jan 2011   #7
marsmimar

Microsoft Community Contributor Award Recipient

 
 

Very nice, Ted. If a technically challenged person like me can follow your instructions then anyone can!
My System SpecsSystem Spec
24 Jan 2011   #8
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Hello Lee, thank you; I have to make them easy to follow so I can understand them too.


My System SpecsSystem Spec
25 Jan 2011   #9
StalkeR

Windows 7 Ultimate SP1 / Windows 10 Pro x64
 
 

Great Tutorial BFK! Also Happy Birthday!
My System SpecsSystem Spec
Comment

 SFC /SCANNOW : Run in Command Prompt at Boot




Tutorial Tools




Similar help and support threads
Windows 7 Tutorial Category
Instant BSOD: Can not boot from HDD: Command Prompt not Helping
Hey everyone, This is my first post here, but I have found a wealth of info over the past few days from here. Than you for that. However, my problem doesn't end where others say "SOLVED". The jist of it: My computer is stuck in a loop. Start windows normally, safe start, neither works. ...
BSOD Help and Support
Old version of command prompt and cannot run scannow
Greetings! I found this forum because of multiple, random BSOD screens related to athr.sys http://www.sevenforums.com/bsod-help-support/283233-bsod-random-intervals-arthr-sys.html Now when I open the comand prompt, the version is old, I have it - but without the capacity to 'Run as...
System Security
How would I run system restore from command prompt? Can not boot...
thanks
Backup and Restore
Getting to command prompt to disable bitlocker when comp won't boot
When I try start my computer I get this blue screen: STOP: c000021a {Fatal System Error} The intial session process or system process terminated unexpectedly with a sta tus of 0x00000000 (0xc0000001 0x00100a20). The system has been shut down. It will not boot in safe mode or safe mode with...
System Security
How do I make a DOS / command prompt boot CD?!?
I've looked everywhere on the web, and everything seems to apply to Windows 98 or earlier, and people with floppy disks! I need a simple CD or USB drive (CD preferably as USB booting I can never get to work) so I can flash a BIOS. The computer has no flash function in BIOS setup, and no windows...
General Discussion
Boot into safemode from the command Prompt? Possible?
I cant get windows to boot and it wont restore to another point with a repair disk, but when I put the repair disk in, it gives me an option to open a command prompt window. Is there a command to make the computer boot in safemode i can enter from the cmd prompt?
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:31.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App