Programmatically accessing CHKDSK without calling CHKDSK.EXE

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
My objective is to programmatically perform a full surface scan of a HD,
<span style="text-decoration:underline without fixing any problems. If a problem is detected, then I would like to rerun the disk check to fix the problem.<br/>

<img alt="" src="http://social.msdn.microsoft.com/Forums/getfile/188986
I <span style="text-decoration:underline cannot use CHKDSK.EXE as there is no operation to perform a surface scan
<span style="text-decoration:underline without performing<br/>
a repair:
"Checks a disk and displays a status report. <br/>
<br/>
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] <br/>
<br/>
<br/>
volume Specifies the drive letter (followed by a colon), <br/>
mount point, or volume name. <br/>
filename FAT/FAT32 only: Specifies the files to check for fragmentation. <br/>
/F Fixes errors on the disk. <br/>
/V On FAT/FAT32: Displays the full path and name of every file <br/>
on the disk. <br/>
On NTFS: Displays cleanup messages if any. <br/>
/R Locates bad sectors and recovers readable information <br/>
(implies /F). <br/>
/L:size NTFS only: Changes the log file size to the specified number <br/>
of kilobytes. If size is not specified, displays current <br/>
size. <br/>
/X Forces the volume to dismount first if necessary. <br/>
All opened handles to the volume would then be invalid <br/>
(implies /F). <br/>
/I NTFS only: Performs a less vigorous check of index entries. <br/>
/C NTFS only: Skips checking of cycles within the folder <br/>
structure. <br/>
/B NTFS only: Re-evaluates bad clusters on the volume <br/>
(implies /R) <br/>
<br/>
The /I or /C switch reduces the amount of time required to run Chkdsk by <br/>
skipping certain checks of the volume."
When a repair is not repaired, the hard drive doesnt have to be locked. When
repair is disabled, you can even scan the Windows drive while Windows is running!
<span style="text-decoration:underline Please assist .<br/>











View the full article
 

Similar threads

D
Replies
0
Views
110
Donald Uko
D
Q
Replies
0
Views
137
questionsformicrosoftproducts
Q
Q
Replies
0
Views
185
questionsformicrosoftproducts
Q
Back
Top