The command sfc /scannow is a useful Windows command that runs a system file check to make sure essential files are not damaged or missing.
This can be mighty useful in many situations, for instance when Windows features don't work anymore, after an unexpected shutdown of the system, or after a virus attack.
The default command runs the file verification check on the active partition. What if you want to run a check on an external drive?
I ran into an issue today for instance where my main PC would not boot anymore. Windows ran an endless "trying to repair" loop but would not budge at all. I made the decision to connect the drive that Windows was installed on to another computer system, to run checks on it. One of those checks was the system file check using sfc.exe.
You may run the sfc /scannow command on external drives, or internal drives with another Windows installation.
The process is nearly identical:
If you are interested in all switches that SFC supports, type SFC /?
The following command needs to be used to run the system file scan on another directory that is not the active system directory:
sfc /scannow /offwindir=d:\windows /offbootdir=d:\
Note that you need to replace d:\windows with the correct directory. If the Windows installation is on t:\win, replace the instance of d:\windows in the example above with those.
The Windows tool runs a file system verification scan on the selected Windows directory, and tries to repair any issues that it finds.
Note that I'm not entirely sure how this works if the host system runs a different version of Windows than the system that is checked.
You can run the other sfc commands as well on other Windows directories:
SFC may return the following messages:
The file verification check can be useful, but it is not a 100% method of correcting Windows issues. I had to restore an earlier backup for instance, as the sfc command would not find anything wrong with the system files.
Now Read: SFCFix may help if SFC does not fix issues
Please click on the following link to open the newsletter signup page: Ghacks Newsletter Sign up
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.
“If the Windows installation is on t:\win”
From the article above. That looks like the letter “t”. I only have 2 Windows installations on drive C and D according to explorer. Never have put anything on T is there a reason anyone would want to?
Oh yeah, for sure. I mean, “t” is only being used as an example–could have put “z” or some other letter. Desginating a drive as “t” really comes in handy when “testing” a version of an Windows. Kind of jogs the memory “t” for testing.
sfc /scannow /offwindir=t:\windows /offbootdir=t:\
I like “z” alot; in fact, I don’t have a drive with an assigned letter C, D, E, etc.
sfc /scannow /offwindir=z:\windows /offbootdir=z:\
Old school learned to go backwards with drive letter assignments for various purposes. It makes for some great reading/research.
I just keep getting
‘… could not start the repair service’
What am I meant to do?
I got the same error when I used sfc /scannow /offwindir=d:\windows /offbootdir=d:\ to scab D: (yeah, I have a D: drive for data, in fact):
Windows Resource Protection could not start the repair service.
If sfc doesn’t fix the problems, I use sfcfix v3.0 which can be downloaded from Major Geeks.
Refer to Martin’s blog from 6/11/15. You can find the blog easily by typing “sfcfix” (without the quotation marks) into the search box above right.
I run Win/10 and have a drive C,D,E & F;the latter two being external HDs and C&D being internal.Tried doing thru CP and it says”Windows Resource Protection could not start the repair service.”.So I did as you say in safe mode and still no go.
Yeah, same issue for me using Widows 10. Bob.
Okay, SFCFix 3.0.2.1 from Major Geeks worked on my Windows 10 machine. Thank you, Gary D.