Windows Vista: The Complete Reference (Complete Reference Series)
The ChkDsk (Check Disk) program can both diagnose and repair errors on a wide variety of devices, including hard disks, floppy disks, RAM drives , removable disks, and laptop memory cards. ChkDsk doesn't work on CD-R or CD-RW discs. ChkDsk can check the physical surface of disk drivers for bad sectors and possibly recover lost data, and it checks the file allocation table (FAT), the directory structure, and the long filenames associated with many files.
Note | If Windows crashes or you turn off the computer without shutting down, Windows typically runs ChkDsk when you restart, to check your hard disk for errors resulting from the unexpected termination. There are some occasions when ChkDsk will not run. |
Windows Vista comes with a feature called Windows File Protection , or WFP. WFP is running whenever Windows is running, monitoring the files that make up Windows itself. Whenever a program replaces one of the Windows system files, WFP checks whether the new file was accompanied by a "signed" ( verified and encrypted) file from Microsoft. If not, or if an earlier version of a file has replaced a later version, WFP replaces the file with its own copy (from the WFP collection of duplicate files at C:\Windows\System32\dllcache, if Windows is installed on C:).
You don't have to turn WFP on, and there's no way to turn it off. WFP doesn't display any messages when it decides to replace a system file with its own version, but it may prompt you to insert the Windows Vista CD-ROM to reinstall a file.
Running ChkDsk
Certain ChkDsk functions, like fixing disk errors and recovering lost sectors, are not accessible while Windows is running. This is because the repairs cannot be completed while there are open files on the disk to be fixed. When you try to run ChkDsk, Windows might need to schedule the program to run the next time you restart Windows instead. To run ChkDsk, follow these steps:
-
Right-click the disk drive in the Computer window and choose Properties.
-
In the Properties dialog box for the disk, click the Tools tab and click the Check Now button. You see the Check Disk dialog box:
-
Select both check boxes to perform a full disk check and click Start. You usually see a message saying that Windows can't run the program until the next time you start Windows.
-
Click Yes. The next time Windows starts, you see a message that the disk check has been scheduled, and displaying the results as the program runs, which can take several minutes (depending on the size of the disk). When ChkDsk runs, you see its results before Windows displays your logon screen or desktop.
Tip | You can also run ChkDsk at the DOS command prompt (see "The Command Prompt Window" in Chapter 4). Choose Start Run and type chkdsk at the command prompt. Then press ENTER. To tell ChkDsk to fix any errors it finds, type chkdsk /f instead. |
Other ChkDsk Options
ChkDsk can do a number of other things if you run it at the command prompt. To see your options at the command line, type the following at the prompt in a Command Prompt window:
chkdsk /?
or type help chkdsk . When you press ENTER, you see information about ChkDsk's options, which are also listed in Table 35-1. Some switches work only on NTFS partitions, and some work only on FAT32 partitions.
Switch or Argument | FAT32 Partitions | NTFS Partitions |
---|---|---|
Volume | Specifies the drive to be acted on. Enter the drive letter as the letter and a colon (e.g., c:, d:, x:) or as a volume name (e.g., CRUNCHY, DRV012). | |
Filename | Specifies specific files to be checked for fragmentation. | Not used. |
/F | Fixes errors on the specified disk. If no disk is specified, ChkDsk checks the boot disk and fixes it as needed. | |
/V | Displays the full filename and path of every file on the disk. This is not recommended, unless you have a lot of free time. | Not used. |
/R | Locates and attempts to recover the data in lost sectors. This command also implicitly applies an /F command. | |
/L: size | Not used. | Changes the file size of the operations log to the specified amount (in KB: 1 MB = 1024 KB). |
/X | Causes a mounted volume to be forcibly dismounted before performing the implicit /F command. This switch cannot be used on the boot volume. | |
/I | Not used. | Performs a less complete index check. |
/C | Not used. | Skips checking directory structure cycles. |