Using SFC on a slaved drive

glricht

Well-Known Member
Reaction score
793
Location
Zephyrhills, Florida
I was perusing some tech forums and came across a post saying that in Windows 7 you could use SFC to check the Windows files on a slaved drive. I've only used SFC to check the booted Windows (e.g. SFC /SCANNOW) and wasn't aware the Win 7 version could check an off-line Windows. Checked SFC's command line options and there it was:

Sfc [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>] [/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory>]

/SCANNOW
Scans the integrity of all protected system files and repairs files with problems when possible.

/VERIFYONLY
Scans integrity of all protected system files. No repair operation is performed.

/SCANFILE
Scans integrity of the specified file and repairs the file if problems are detected, when possible.

<file>
Specified full path and filename

/VERIFYFILE
Verifies the integrity of the specified file. No repair operation is performed.

/OFFWINDIR
Specifies the location of the offline windows directory, for offline repair.

/OFFBOOTDIR
Specifies the location of the offline boot directory for offline

MS gives this example for checking a file on a slaved drive:
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows

However, when I tried the above MS example on my Win 7 Ult 64-bit using a slaved Win 7 H.P. HD, SFC always comes back with "Unable to start the repair operation".

Seems that this would be useful in certain cases. Have you done this? Did it work for you?
 
I didn't know you could run sfc offline either. I was able to get it to run using this command.

sfc /scannow /offbootdir=d:\ /offwindir=d:\windows
 
I know it's obvious but since not mentioned i'll ask:
-are you running as administrator?
 
I didn't know you could run sfc offline either. I was able to get it to run using this command.

sfc /scannow /offbootdir=d:\ /offwindir=d:\windows

Was your slaved drive attached via USB or connected directly to the MB? Wouldn't think there would be any difference, but you never know. My test was via a USB-attached drive.
 
My secondary drive is plugged into the sata port. You're saying that exact command I posted doesn't work for you? You have to include the offbootdir switch or it won't work.
 
My secondary drive is plugged into the sata port. You're saying that exact command I posted doesn't work for you? You have to include the offbootdir switch or it won't work.

The original test to scan an individual file didn't work, I didn't try it using the /SCANNOW option.

Just tried it again with /SCANNOW and sfc comes back with "Windows Resource Protection could not start the repair service". Will have to do more research.

@mraikes: yes, it's obvious, and yes, the actual drive letter was used
 
Last edited:
Back
Top