Use the System File Checker tool to troubleshoot missing or corrupted system files on Windows Vista or on Windows 7

Article ID: 929833 - View products that this article applies to.
If you are a Small Business customer, find additional troubleshooting and learning resources at the Support for Small Business site.
Expand all | Collapse all

INTRODUCTION

This article describes how to use the System File Checker tool (SFC.exe) to troubleshoot missing or corrupted system files on Windows Vista or on Windows 7.

If a Windows Resource Protection (WRP) file is missing or is corrupted, Windows may not behave as expected. For example, some Windows functions may not work, or Windows may crash. The System File Checker tool (SFC.exe) scans for missing or corrupted system files and repairs them.

More information

Use the System File Checker tool (SFC.exe) to determine which file is causing the issue, and then replace the file.

To do this, follow these steps:
  1. Open an elevated command prompt. To do this, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.
  2. At the command prompt, type the following command, and then press ENTER:
    sfc /scannow
    The sfc /scannow command scans all protected system files and replaces incorrect versions with correct Microsoft versions.

More troubleshoot steps for advanced users

Step1: To determine which files could not be repaired by the System File Checker tool.

Collapse this imageExpand this image
Follow these steps:
  1. Open an elevated command prompt as described in the previous step 1.
  2. At the command prompt, type the following command, and then press ENTER:
    findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
    Collapse this imageExpand this image
    Note The Sfcdetails.txt file contains details from every time that the System File Checker tool has been run on the computer. The file includes information about files that were not repaired by the System File Checker tool. Verify the date and time entries to determine the problem files that were found the last time that you ran the System File Checker tool.
  3. Type sfcdetails.txt in Search programs and files, and then press Enter.

    The Sfcdetails.txt file uses the following format:
    Date/Time SFC detail
The following sample log file contains an entry for a file that could not be repaired:
2007-01-12 12:10:42, Info                  CSI    00000008 [SR] Cannot 
repair member file [l:34{17}]"Accessibility.dll" of Accessibility, Version = 
6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, 
VersionScope neutral, PublicKeyToken = {l:8 b:b03f5f7f11d50a3a}, Type 
neutral, TypeName neutral, PublicKey neutral in the store, file is missing
Collapse this imageExpand this image

Step2: If the System File Checker tool cannot repair a file.

Collapse this imageExpand this image
Follow these steps:
  1. At an elevated command prompt, copy and then paste (or type) the following command, and then press ENTER:
    takeown /f Path_And_File_Name
    For example, type takeown /f E:\windows\system32\jscript.dll.
  2. Copy and paste (or type) the following command, and then press ENTER to grant administrators full access to the file:
    icacls Path_And_File_Name /GRANT ADMINISTRATORS:F
    For example, type icacls E:\windows\system32\jscript.dll /grant administrators:F.
  3. Copy and paste (or type the following command to replace the file with a known good copy of the file:
    Copy Path_And_File_Name_Of_Source_File Path_And_File_Name_Of_Destination
    For example, type copy E:\temp\jscript.dll E:\windows\system32\jscript.dll.
Collapse this imageExpand this image

Properties

Article ID: 929833 - Last Review: January 15, 2013 - Revision: 9.0
Applies to
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
  • Windows Vista Business
  • Windows Vista Business 64-bit Edition
  • Windows Vista Enterprise
  • Windows Vista Ultimate
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Starter
  • Windows 7 Ultimate
Keywords: 
kbtshoot kbexpertisebeginner kbprb kbcip KB929833

Give Feedback