The Windows System File Checker (SFC) is a niftytool for repairing corrupted files. Here’s a quick guide on how you can restoreyour files and get your PC running normally again.

RunSFC

First, you willneed to open an elevated Command Prompt(CMD). Basically, you will need to run Command Prompt as an administrator.

Open an Elevated Command Prompt

Run Search and type Command Prompt. Find Command Prompt from the results, right-clickit, then select Run as Administrator.

RunDISM (Windows 8 and higher)

Windows 8,Windows 8.1, and Windows 10 users, you will need to run the Deployment Image Servicing and Management(DISM) tool before launching SFC.

Note: Windows 7 users can skip ahead to the next step.

In the CommandPrompt, type the following command then press enter:

DISM will useWindows Update to find files that will replace or repair the corruptedversions. This process could take several minutes.

Run SCANNOW

Now we can scanthe system for corrupted files. On the Command Prompt, type the command:

With thiscommand, Windows will go through your files and replace the corrupted files.Scanning will take some time. It’s important that you do not close the CommandPrompt until the scan is 100% complete.

Review the Results

Once the scan isfinished, you will receive one of the following messages:

  • Windows Resource Protection did not find any integrity violations – Windows was unable to find corrupt files in your hard disk
  • Windows Resource Protection could not perform the requested operation – This means you have to run System File Checker using Safe Mode
  • Windows Resource Protection found corrupt files and successfullyrepaired them – Windows found the broken files andfixed them
  • Windows Resource Protection found corrupt files but was unable to fixsome of them — Windows found corrupt files but wasunable to do anything about it

ViewSFC details

You can open thesfcdetails.txt file to view or copy the information gathered from the scan. Usethe instructions below to locate the aforementioned text file.

Open an elevatedCommand Prompt and type the following command:

This will createa copy of the file on your desktop. Open the file and scan through the results.Do note that the file will show all the data, including ones that were gatheredfrom previous SFC runs.

You will need tocheck the time and the date to find specific entries.

Replace Corrupt Files Manually

If SFC fails toreplace the broken Windows file, you can try doing so manually. This ispossible as long as you know where the corrupt file is located. You will alsoneed a good copy of that file so it can be replaced.

Open an elevatedCommand Prompt and type the following command:

Remember toreplace <File Location> with the path of the corrupt file. This commandwill allow you to take ownership of the infected file. CMD will inform you ifthe takeover is a success.

Once finished,give administrators access to the corrupt file. Do so by typing the followingcommand:

Again, rememberto replace <File Location> with the corrupt file path.

Now you canreplace the bad file with the good version. You will need to copy the good fileand paste it where the old one is. Type the following command:

Replace<Source> with the file location of the good copy and replace<Destination> with the path of the corrupt version.