Scanning and Fixing System Files

by Allen Wyatt
(last updated April 4, 2016)

2

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) from the available options. (This works in both Windows 8 and Windows 10. 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

Always Open at 100% Zoom

Tired of shared workbooks opening at some strange zoom factor that makes viewing your data difficult? Here's how to make ...

Discover More

Centering a Paragraph with the Keyboard

Need a quick shortcut that you can use to center your paragraph between the margins? The answer is here.

Discover More

Adding Multiple Rows to a Table

Need to add more than a single row to an existing table? Word provides an assortment of ways that you can accomplish the ...

Discover More
More WindowsTips

Enabling Speech to Text Dictation

With Dictation feature in Windows 10 Fall Creators Update, you can quickly say what you want and have Windows 10 ...

Discover More

Changing Explorer Navigation Controls

Every time Windows updates the operating system, it seems that they leave out or remove something that somebody loved in ...

Discover More

M8 Free Clipboard

If you've ever found it tedious to do copy/paste with one piece of information at a time, you'll really like M8 Free ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

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}] 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 9?

2016-04-04 06:29:05

Rudy

A few minutes ago I entered a comment. Then I went back and _carefully_ read the directions. I had not used Ctrl+Shift+Enter to run the Command Prompt window.

I tried a second time, and sfc is now running.

Sorry for having caused any trouble.


2016-04-04 06:22:38

Rudy

I followed the directions and encountered the following message:

"You must be an administrator running a console session in order to use the sfc facility."

I am the only user of this machine, so I'm wondering why I'm not an administrator. I'm also wondering what a 'console session' is.


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.