You could skin it a different way and use WMI:

strComputer = "."
objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + 
strComputer +"\root\cimv2")
objDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='D:'")
errReturn = objDisk.ChkDsk(.f.)      && or .t. to fix errors
? errReturn

I believe the return codes etc are as described here: 
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/vdswmi/chkdsk-method-in-class-win32-volume




-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/e1732083-1a77-438c-b1d4-c3f01695c...@app.fastmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to