Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

sfc

Feedback

In this article

Scans and verifies the integrity of all protected system files and replaces incorrect versions with correct versions. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from thesystemroot\ folder, and then replaces the incorrect file.

Important

You must be logged on as a member of the Administrators group to run this command.

Syntax

sfc [/scannow] [/verifyonly] [/scanfile=<file>] [/verifyfile=<file>] [/offwindir=<offline windows directory> /offbootdir=<offline boot directory> /offlogfile=<log file path>]

Parameters

ParameterDescription
/scannowScans the integrity of all protected system files and repairs files with problems when possible.
/verifyonlyScans the integrity of all protected system files, without performing repairs.
/scanfile<file>Scans the integrity of the specified file (full path and filename) and attempts to repair any problems if they're detected.
/verifyfile<file>Verifies the integrity of the specified file (full path and filename), without performing repairs.
/offwindir<offline windows directory>Specifies the location of the offline windows directory, for offline repair.
/offbootdir<offline boot directory>Specifies the location of the offline boot directory for offline repair.
/offlogfile=<log file path>Specifies a location to store the log file other than the default.
/?Displays help at the command prompt.

Examples

To verify thekernel32.dll file, type:

sfc /verifyfile=c:\windows\system32\kernel32.dll

To set up the offline repair of thekernel32.dll file with an offline boot directory set toD: and an offline windows directory set toD:\Windows, type:

sfc /scanfile=D:\windows\system32\kernel32.dll /offbootdir=D:\ /offwindir=d:\windows

Related links


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo