>>>>Doesn't work correctly on my D drive. It returns 2147155968 for all properties.
>>>
>>>Does this drive have any files? AvailableSpace and FreeSpace are supposed to be the same, but not TotalSize.
>>
>>No, it's running Win9x, and cast the return value as an Integer; the value returned is the largest available integer in a VFP integer value (2^31-1). It's a problem related to how Win9x interprets the data type; NT and NT derivatives will use a real rather than an integer, and will return the correct size. I thought this was corrected in WSH 2.1 or 5.
>
>Is there an easy (or programmatic) way to tell which version of the WSH we have installed?
Sure, you can use AGETFILEVERSION() on the executable scrrun.dll, or look it up in the registry (find the CLSID under the ProgID in HKEY_CLASSES_ROOT, and then locate the Version key under the CLSID in HKEY_CLASSES_ROOT.)