
Use the System File Checker tool to repair missing or corrupted system files
When critical Windows system files are missing or corrupted, some Windows features may stop working correctly or Windows may stop responding altogether. If this happens, you can use the Deployment Image Servicing and Management tool (DISM) and the System File Checker tool (SFC) to scan your system files and restore any corrupted or missing files.
Step 1: Run DISM
DISM provides the files required to repair your corrupted files. You should run DISM prior to running the System File Checker. To do this:
- Open an elevated command prompt.
- Type cmd in the Search box.
- In the search results, right-click Command Prompt, and then select Run as administrator.
- If you are prompted for confirmation or an administrator password, type the password, or click Allow.
- In the Command Prompt window, type the following command and press Enter.  It may take several minutes for the command operation to be completed.
DISM.exe /Online /Cleanup-image /Restorehealth
Tips:
- DISM uses Windows Update as the source to provide the necessary files. However, if your Windows Update client is broken, you can use a running Windows installation, or a Windows side-by-side folder from a network share or removable media, such as the Windows DVD, as the source of the files. To do this, run the following command instead:Â
- DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess
- In the above command, replace the C:\RepairSource\Windows placeholder with the location of your repair source.  For more information about using the DISM tool to repair Windows, see Repair a Windows Image.
Step 2: Run System File Checker
In the Command Prompt window, type the following command, and press ENTER:
sfc /scannow
Warning: Do not close this Command Prompt window until the verification is 100% complete.
The sfc /scannow command will scan all protected system files and replace corrupted files with a cached copy. The scan results will be shown after this process is finished. You may receive one of the following messages:
Scan result message | Corresponding action |
---|---|
Windows Resource Protection did not find any integrity violations. | You do not have any missing or corrupted system files. |
Windows Resource Protection could not perform the requested operation. | To resolve this problem, perform the System File Checker scan in safe mode.Make sure that the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp.The %WinDir% placeholder represents the Windows operating system folder, such as, C:\Windows. |
Windows Resource Protection found corrupt files and successfully repaired them. | The operation was successful. To view detailed information about the system file scan and restoration, go to How to view details of the System File Checker process. |
Windows Resource Protection found corrupt files but was unable to fix some of them. | To repair the corrupted files manually, view details of the System File Checker process to find the corrupted file, and then manually replace the corrupted file with a known good copy of the file. |