How to Repair Defective or Missing System Files in Windows

Many Windows problems are caused by damaged or missing system files. Damaged or missing system files may stem from malware, failed updates, botched installations, and more. System File Checker is a component of Windows which can...
Part 1 of 4:

Starting and Using System File Checker

  1. How to Repair Defective or Missing System Files in Windows Picture 1How to Repair Defective or Missing System Files in Windows Picture 1
    Open the Start menu. Click the Start button.
  2. How to Repair Defective or Missing System Files in Windows Picture 2How to Repair Defective or Missing System Files in Windows Picture 2
    Search for Command Prompt. Type cmd.exe.
    1. Users of Windows XP must click All Programs then the Accessories subcategory.
  3. How to Repair Defective or Missing System Files in Windows Picture 3How to Repair Defective or Missing System Files in Windows Picture 3
    Start Command Prompt as an administrator. Right click cmd.exe to open the context menu and click Run as administrator.
    1. Users of Windows XP must hold the Shift key while right clicking Command Prompt, click Run As to open a dialog window, select the The following user radio button, type Administrator as the user name and the password of the account (usually blank), and click OK.
    2. Click Yes on the User Account Control dialog if it appears.
  4. How to Repair Defective or Missing System Files in Windows Picture 4How to Repair Defective or Missing System Files in Windows Picture 4
    Start System File Checker. In Command Prompt, type sfc /scannow and press the Enter key on your keyboard.
  5. How to Repair Defective or Missing System Files in Windows Picture 5How to Repair Defective or Missing System Files in Windows Picture 5
    Wait until System File Checker finishes checking and fixing your system.
Part 2 of 4:

Starting and Using System File Checker Via Safe Mode

  1. How to Repair Defective or Missing System Files in Windows Picture 6How to Repair Defective or Missing System Files in Windows Picture 6
    Start Windows in Safe Mode with Command Prompt.
  2. How to Repair Defective or Missing System Files in Windows Picture 7How to Repair Defective or Missing System Files in Windows Picture 7
    Start System File Checker. In Command Prompt, type sfc /scannow and press the Enter key on your keyboard.
  3. How to Repair Defective or Missing System Files in Windows Picture 8How to Repair Defective or Missing System Files in Windows Picture 8
    Wait until System File Checker finishes checking and fixing your system.
  4. How to Repair Defective or Missing System Files in Windows Picture 9How to Repair Defective or Missing System Files in Windows Picture 9
    Shut down your computer by typing shutdown -t 0:00 into Command Prompt and pressing the Enter key on your keyboard.
Part 3 of 4:

If You Experience an Error While Trying to Start System File Checker

How to Repair Defective or Missing System Files in Windows Picture 10How to Repair Defective or Missing System Files in Windows Picture 10

Start the Trusted Installer and Windows Module Installer Services

  1. How to Repair Defective or Missing System Files in Windows Picture 11How to Repair Defective or Missing System Files in Windows Picture 11
    Open the Start menu. Click the Start button.
  2. How to Repair Defective or Missing System Files in Windows Picture 12How to Repair Defective or Missing System Files in Windows Picture 12
    Search for Command Prompt. Type cmd.exe.
    1. Users of Windows XP must click All Programs then the Accessories subcategory.
  3. How to Repair Defective or Missing System Files in Windows Picture 13How to Repair Defective or Missing System Files in Windows Picture 13
    Start Command Prompt as an administrator. Right click cmd.exe to open the context menu and click Run as administrator.
    1. Users of Windows XP must hold the Shift key while right clicking Command Prompt, click Run As to open a dialog window, select the The following user radio button, type Administrator as the user name and the password of the account (usually blank), and click OK.
    2. Click Yes on the User Account Control dialog if it appears.
  4. How to Repair Defective or Missing System Files in Windows Picture 14How to Repair Defective or Missing System Files in Windows Picture 14
    Start the Trusted Installer service. Type net start "trustedinstaller" into Command Prompt and press Enter.
  5. How to Repair Defective or Missing System Files in Windows Picture 15How to Repair Defective or Missing System Files in Windows Picture 15
    Start the Windows Modules Installer service. Type net start "windows modules installer" into Command Prompt and press Enter.
  6. How to Repair Defective or Missing System Files in Windows Picture 16How to Repair Defective or Missing System Files in Windows Picture 16
    Follow the Steps of Part 1.

If Starting the Services Does Not Resolve the Error

  1. Follow the steps of Part 2 to resolve the problem.
  2. Make sure you aren't attempting to start System File Checker in the 64-bit version of Command Prompt.
    1. The title of the Command Prompt window should not say C:WindowsSysWOW64cmd.exe.
      How to Repair Defective or Missing System Files in Windows Picture 17How to Repair Defective or Missing System Files in Windows Picture 17
Part 4 of 4:

Interpreting the System File Checker Results

After System File Checker finishes checking your system for errors, it will present you with a message. The following are the messages and what they mean.

How to Repair Defective or Missing System Files in Windows Picture 18How to Repair Defective or Missing System Files in Windows Picture 18

Windows Resource Protection did not find any integrity violations.

  1. This means that no damaged or missing system files were found.
    How to Repair Defective or Missing System Files in Windows Picture 19How to Repair Defective or Missing System Files in Windows Picture 19

Windows Resource Protection could not perform the requested operation.

  1. This means that System File Checker failed to work correctly, but it does not necessarily mean that problems were detected.
  2. To fix this error:
    1. Make sure that folders called PendingDeletes and PendingRenames exist under %WinDir%WinSxSTemp.
      1. Press the Win+R keys simultaneously on your keyboard to open the Run dialog.
      2. Type %WinDir%WinSxSTemp into the Run dialog and click OK to open Windows Explorer.
      3. Search for folders called PendingDeletes and PendingRenames in Windows Explorer.
      4. If the folders are missing, copy them into the Windows Explorer window from another computer running the same operating system from the same location.
    2. Follow the steps of Part 2.
      How to Repair Defective or Missing System Files in Windows Picture 20How to Repair Defective or Missing System Files in Windows Picture 20

Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log %WinDir%LogsCBSCBS.log.

  1. System File Checker found and fixed problematic system files and a log, which is a summary of the repairs made, has been created.
  2. To view the log (optional):
    1. Press the Win+R keys simultaneously on your keyboard to open the Run dialog.
    2. Type %WinDir%LogsCBSCBS.log into the Run dialog and click OK.
    3. The log will be displayed.
      How to Repair Defective or Missing System Files in Windows Picture 21How to Repair Defective or Missing System Files in Windows Picture 21

Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%LogsCBSCBS.log.

  1. Problematic files were found, but System File Checker failed to repair some of them.
  2. To fix the files automatically (may not always work):
    1. Boot into Safe Mode.
    2. Open Command Prompt as an administrator. Click the Start button, type cmd, right click the first search result, then click Run as administrator.
    3. Type Dism /Online /Cleanup-Image /RestoreHealth and press Enter.
  3. To fix the files manually (advanced):
    1. Determine the files that need to be repaired.
      1. Open the Start menu. Click the Start button.
      2. Click All Programs in the Start menu.
      3. Expand the Accessories folder in the Start menu.
      4. Start Command Prompt. Click Command Prompt under the Accessories folder.
      5. Type findstr /c:"[SR]" %windir%LogsCBSCBS.log >"%userprofile%Desktopsfcdetails.txt" into Command Prompt and press the Enter key on your keyboard.
      6. Double click the 'sfcdetails.txt file from your desktop to open Notepad.
      7. Navigate through Notepad to look for any corrupted files which System File Checker failed to correct, and note the file names.
    2. Find a working version of the file(s).
      1. On another computer that is running the same edition of Windows as the computer you are trying to repair, locate the file that was not successfully repaired and copy it onto a removable drive.
      2. Search for the file online if it is not available on another computer, and download it from a safe source.
        1. Be sure to check the downloads for viruses before using them to repair the computer.
    3. Take full control of the corrupted system file on the computer you are trying to repair.
      1. On the computer that needs to be repaired, open the Start menu. Click the Start button.
      2. Click All Programs in the Start menu.
      3. Expand the Accessories folder in the Start menu.
      4. Start Command Prompt as an administrator. Right click Command Prompt under the Accessories folder to open the context menu and click Run as administrator.
      5. Click Yes on the User Account Control dialog.
      6. Type takeown /f "" into Command Prompt and press Enter on your keyboard.
        1. should be replaced with the path of the corrupted file that you want to replace. (E.G. Takeown /f "C:WindowsSystem32notepad.exe")
      7. Type icacls "" /GRANT ADMINISTRATORS:F into Command Prompt and press Enter on your keyboard.
        1. should be replaced with the path of the corrupted file that you want to replace. (E.G. icacls "C:WindowsSystem32notepad.exe" /GRANT ADMINISTRATORS:F)
    4. Replace the corrupted file.
      1. Open the Start menu. Click the Start button.
      2. Click All Programs in the Start menu.
      3. Expand the Accessories folder in the Start menu.
      4. Start Command Prompt as an administrator. Right click Command Prompt under the Accessories folder to open the context menu and click Run as administrator.
      5. Click Yes on the User Account Control dialog.
      6. In Command Prompt, type Copy "" "" and press Enter on your keyboard.
        1. should be replaced with the path of the good copy of the file (depending on where you stored the good version of the problematic file).
        2. should be replaced with the path of the bad version of the file.
        3. (E.G. Copy "F:notepad.exe" "C:WindowsSystem32notepad.exe")
5 ★ | 1 Vote