Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Verify the Integrity of Windows Vista System Files

Windows Vista includes a utility that will scan your system for corrupt, changed or missing system files. Running this from the command prompt is much easier than booting off the dvd into repair mode.

To run this utility, you will need to open a command prompt in administrator mode. You can do that by right clicking the Command Prompt in the list, or by using the nifty keyboard shortcut.

Once you have an administrator command prompt open, you can run the utility by using the following syntax:

SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>]
[/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory>]

The most useful command is just to scan immediately, which will scan and attempt to repair any files that are changed or corrupted. You can run that command with this command:

sfc /scannow

Alternatively, you can just choose to verify a particular file, or you can do a verify only, which will check but not repair anything. Here's an example:

Note that this utility exists for XP as well, but has different options.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 01/8/07 and tagged with: Windows Vista, System Administration

Comments (8)

  1. Richard

    thanks, great website and very helpful

  2. juancho P

    Great Tip thanks keep in comin'

  3. jules

    Hi,
    i am wandering, if the sfc process takes in account the last Microsoft KB's, i have installed since
    my xp->vista home premium upgrade?
    As the version of system files could change after the security updates?
    If NO, wont my system files return to previous state (before the Kb updates) and so will i have to reinstall all the kb's again?
    thanks for advice
    regards

  4. Mark

    How do you suggest that I Diagnose and fix the problem when SFC returns that it is unable to fix errors?

    I'm not quite sure what the problem is but a number of DLLs cause errors during startup and Windows Media Center will no start (somewhat fundamental to a Media PC).

    Also Windows Update has failed install kb932539 about 5 times now.

    FYI I'm runnign Vista 64 Home Premium edition.

  5. nick green

    cheers for this saved me alot of hastle with a bad .dll file all fixed now. cheers! great site

  6. whs

    What would be helpful is a way on how to identify the corrupted files - if any. I ran scannow several times and it found corrupted files that it could not fix. Then it gave the path to a log that I was unable to open (access denied). So I was just as smart as before. It would be nice to know how to open this log and have a look at what's corrupted.

  7. breps

    thanks for this, it helped me out big time! I was about to load in the vista disk and do a reboot.

    WHS - you probably need to try opening the log file with a program that is running under an administrator account.

    Try running notepad as an administrator, then open the log file with " File > Open ".

  8. Mike

    You guys are awesome! I use a celeron running vista. Is there a way I can make her go faster. Software or some tweak I can do on em?


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.