システム統合の確認と修復
sfc
管理者権限(Administrator)
- C:\Windows\system32\sfc.exe /?
Output:
Microsoft (R) Windows (R) Resource Checker Version 6.0
Copyright (C) Microsoft Corporation. All rights reserved.
すべての保護されたシステム ファイルの整合性をスキャンして、間違ったバージョンを
正しい Microsoft バージョンに置換します。
SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<ファイル>] [/VERIFYFILE=<ファイル>]
[/OFFWINDIR=<オフライン Windows ディレクトリ> /OFFBOOTDIR=<オフライン起動ディレクトリ> [/OFFLOGFILE=<ログ ファイルのパス>]]
/SCANNOW すべての保護されたシステム ファイルの整合性をスキャンして、
可能な場合には問題のあるファイルを修復します。
/VERIFYONLY すべての保護されたシステム ファイルの整合性をスキャンします。
修復操作は実行されません。
/SCANFILE 参照されたファイルの整合性をスキャンして、問題が識別された
場合はファイルを修復します。完全パス <ファイル> を指定します
/VERIFYFILE <ファイル> で指定された完全パスを持つファイルの整合性を確認
します。修復操作は実行されません。
/OFFBOOTDIR オフライン修復の場合は、オフライン起動ディレクトリの場所を指定します。
/OFFWINDIR オフライン修復の場合は、オフライン Windows ディレクトリの場所を指定します。
/OFFLOGFILE オフライン修復の場合は、オプションでログ ファイルのパスを指定してログを有効にします。
例
sfc /SCANNOW
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows /OFFLOGFILE=c:\log.txt
sfc /VERIFYONLY
Microsoft (R) Windows (R) Resource Checker Version 6.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scans the integrity of all protected system files and replaces incorrect versions with
correct Microsoft versions.
SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>]
[/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory> [/OFFLOGFILE=<log file path>]]
/SCANNOW Scans 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 referenced file, repairs file if problems are
identified. Specify full path <file>
/VERIFYFILE Verifies the integrity of the file with full path <file>. No repair
operation is performed.
/OFFBOOTDIR For offline repair, specify the location of the offline boot directory
/OFFWINDIR For offline repair, specify the location of the offline windows directory
/OFFLOGFILE For offline repair, optionally enable logging by specifying a log file path
e.g.
sfc /SCANNOW
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows /OFFLOGFILE=c:\log.txt
sfc /VERIFYONLY
Return Code: 1
C:\Windows\system32\sfc.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
| File | Info |
|---|---|
| File Size | 50176bytes |
| Creation Time | 2019/12/07 18:08:41 |
| LastWrite Time | 2019/12/07 18:08:41 |
| ProductVersion | 10.0.19041.1889 |
| FileVersion | 10.0.19041.1889 (WinBuild.160101.0800) |
| Hash | Value |
|---|---|
| MD5 | f0600834bca330548f261fbaadf783f9 |
| SHA1 | 8d76f73ecbd6837424c1845ff3e3bfa09b16f79d |
| SHA224 | 6d245840a446d58d2d818ebd1a3fde5e222fef62ac37df5280aacc3b |
| SHA256 | e7a57be660b32aebec5c59786d9f56de1dfb9e4bce2b1aaefea94caac5c63e42 |
| SHA384 | f0972d3556dc3b1b630799073c796ec76c6332458e757323e598abaa908ec68ffbf055a48f9bf8d665eca9b1288a6368 |
| SHA512 | 6f701fa28af5d235a72337120510fc42ccaee7df654ac0d4e9dc14ac63db6322c49a4d6cd2e63d74ce53fa34fdf735a08d15a0ebee56dc4f9a9766493da040e1 |