SCANDISK [ W ]

SCANDISK: Errors

Error Message: Not Enough Memory to Run ScanDisk
You may receive this error message even though no other programs are running.
http://support.microsoft.com/support/kb/articles/q134/9/86.asp (W95 Jun. 4,1999)
General Protection Fault Error Message Running ScanDisk
SCANDSKW caused a [ GPF ] in module KRNL386.EXE at...
http://support.microsoft.com/support/kb/articles/q135/9/64.asp (W95 May 27,1999)
ScanDisk Runs After Improper shutdown or Hard Disk Error
http://support.microsoft.com/support/kb/articles/q152/4/04.asp (W98/se/ME Dec. 15, 2000)
Disk Defragmenter or ScanDisk Loops Continuously
When you run ScanDisk or Disk Defragmenter, the operation may restart when only a small percentage of the operation is finished and then continue to restart repeatedly, or the operation may take a very long time.
http://support.microsoft.com/support/kb/articles/q172/4/73.asp (W95 Dec. 14, 2000)
Err Msg: ScanDisk Has Restarted 10 Times Because Windows...
ScanDisk has restarted 10 times because Windows or another program has been writing to this drive. Quitting some running programs may enable ScanDisk to finish sooner. Do you want to continue receiving this warning?
http://support.microsoft.com/support/kb/articles/q222/4/69.asp (W95/98/ME Dec. 14, 2000)
ScanDisk Errors on IDE Hard Disks Larger Than 32 GB
If you use the protected-mode (graphical) version of ScanDisk to perform a thorough scan (which includes a surface scan) on an integrated device electronics (IDE) hard disk that is larger than 32 gigabytes (GB) in size, ScanDisk may report errors on every cluster after approximately cluster number 967,393.
http://support.microsoft.com/support/kb/articles/q243/4/50.asp
ScanDisk Runs Even Though Windows Shut Down Correctly
Although Windows may seem to shut down correctly, ScanDisk may run the next time you start the computer.
http://support.microsoft.com/support/kb/articles/q273/0/17.asp (W98/se/ME Feb. 22, 2001)
"Exception 03h in Module..." Error Message Starting Windows Me
Scandskw caused Fatal exception O3H in module user32.dll.
http://support.microsoft.com/support/kb/articles/q275/0/03.asp (ME Feb. 5, 2001)

SCANDISK: General

ScanDisk Command line switches
How to Cause ScanDisk for Windows to Re-test Bad Clusters
By default, ScanDisk for Windows (Scandskw.exe) does not test clusters that are marked as bad in the file allocation table (FAT). This behavior applies for both compressed and un-compressed drives and is consistent with the behavior of the MS-DOS ScanDisk utility (Scandisk.exe) included with MS-DOS version 6.x and Windows 95.
http://support.microsoft.com/support/kb/articles/q127/0/55.asp (W95/98 Nov. 17,1999)
Problems with scandisk
Scandisk will fix errors quietly and automatically, keeping a running log of its activity in C:\Scandisk.log.
http://www.zdnet.com/pcmag/pctech/content/solutions/oe1517c.htm
Prevent scandisk From Running Automatically
Microsoft Windows 95 OSR2 has a somewhat annoying feature: If the system shuts down in some non standard way (as when a program crashes), the next time you boot, the system will run scandisk before starting. You can turn this feature off by editing the Msdos.sys
The "Autorun Scandisk" box in TweakIU controls how Windows will behave when it detects that the previous Windows session did not shut down properly. This utility is part of PowerToys
http://search.zdnet.com/pcmag/pctech/content/solutions/uu1720b.htm

Top












ScanDisk Command Line Switches


Syntax scandskw [drive:] [/A] [/N] [/P]
scandisk drive:\dblspace.nnn
scandisk drive:\drvspace.nnn


Parameters

drive: Specifies one or more drives to be checked.
/A or /All Checks all local, nonremovable hard disk drives.
/N or /NonInteractive Starts and closes scandisk automatically. However, this switch does not prevent scandisk from stopping to report errors found on the drive.
/p or /Preview Runs scandisk in Preview mode, where it reports and seems to correct errors that it finds, but it does not actually write changes to the disk.

Important: When running scandskw in Preview mode, it appears as though scandisk is fixing errors, but it is not. Also, notice that unlike other settings in scandisk, the /Preview switch is not saved in the Registry, so the next time you run scandisk, it is no longer in Preview mode.

To determine whether scandisk is running in Preview mode, look for the tag "(Preview)" in the caption of the main scandisk window.

dblspace.nnn or drvspace.nnn
Checks the specified un-mounted DoubleSpace or DriveSpace compressed volume file, where nnn is the filename extension for the hidden host file.

The following table describes the codes provided when scandisk finished running.

Exit code Description
0x00 Drive checked, no errors found
0x01 Errors found, all fixed
0xFA Check could not start - cannot load or find DSKMAINT.DLL
0xFB Check could not start - insufficient memory
0xFC Errors found, but at least some were not fixed
0xFD At least one drive could not be checked
0xFE Check was canceled
0xFF Check was terminated because of an error

You can capture the exit code in a batch file to define an action to take in the event of particular exit code. For example:

start /w scandksw c: d: /n
if errorlevel exitcode goto command
...

In this sample, start /w forces the batch file to stop and wait for scandskw to finish (otherwise, because it is a Windows-based program, the batch file would continue as soon as scandskw had been launched). Also in this example, if the actual exit code is greater than or equal to the exit code specified by exitcode, the batch file runs the specified command; otherwise, it continues to the next line in the batch file. The goto command entry could specify any command you want.

Top