Scanning and Fixing System Files

Written by Allen Wyatt (last updated October 14, 2019)

Windows includes a helpful utility that can be used to scan your system files and determine if there are any problems with those files. Why might there be problems? Perhaps a system file was somehow damaged, or it was replaced by malware or another errant utility program.

The utility program is named Windows Resource Protection and is available only from the command prompt, and then only if you are working in administrator mode. Assuming you can boot your system, you can press Win+X on the keyboard and then choose Command Prompt (Admin) [Windows 8] or Windows PowerShell (Admin) [Windows 10] from the available options. In Windows 7, click Start, search for "cmd", and then press Ctrl+Shift+Enter to run the command prompt in administrator mode.)

At the command prompt, enter the following:

sfc /verifyonly

The sfc command is what you use to start the Windows Resource Protection utility. (Why name the command "sfc" when "wrp" would have made more sense for "Windows Resource Protection?" I suspect that the command started out as meaning "system file check," which abbreviates to "sfc" very nicely.) The /verifyonly switch tells the utility to only check things out and not make any changes to the files. After completing the check (it can take a while) you'll get a report back about any problems discovered. (See Figure 1.)

Figure 1. The results of running the sfc command.

Had there been any problems discovered, you could then run the utility with a different switch:

sfc /scannow

This tells Windows Resource Protection to run and fix anything it finds wrong. There are also a whole lot of other switches you could use to modify how the command does its work. The switches available will differ based on the version of Windows you are using. To see what you have available, try this at the command line:

sfc /?

Earlier I mentioned that you can run the Windows Resource Protection utility from the command prompt "assuming you can boot your system." You should know that you can also run the utility from the command line provided if you start your system in Safe Mode or even if you are able to boot your Windows installation media in Repair Mode.

 This tip (198) applies to Windows 7, 8, and 10.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Inserting Initials and Date in a Comment

When you insert a comment into a document, Word keeps track of who entered it and the date when it was entered. Here's ...

Discover More

Hiding Columns Not within a Date Range

Want to automatically hide some columns that don't meet a date criterion that you set? You can't do it automatically, but ...

Discover More

Adding Quoted Words to an Index

It is not unusual to need to convert one notation in a document into another entirely different notation. For instance, ...

Discover More
More WindowsTips

AutoRuns

Would you like to have one place to go in order to see what all programs are starting when your system starts or when you ...

Discover More

Everything

If you want to be able to find any file on your hard disk in just seconds, Everything is a utility you'll find ...

Discover More

Agent Ransack

If you need to search the contents of files fast, Agent Ransack is a tool worth having. It searches through multiple ...

Discover More
Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


Newest Tips