>>>One routine tests characteristics from drives A-Z. It also uses diskspace(). All existing drives are processed very quick. Non-existent drive letters return -1, but these drives too are analyzed by Diskspace() very quick.
>>>
>>>However, I have one drive letter that it waits for, about 30 seconds. It is a drive connected to the c$-share of another PC. That PC is off. So, I guess, diskspace() is simply polling for a reaction and aborts polling after a certain time only.
>>>
>>>Who knows whether there is any other function (API perhaps) that gives the not-connected information quicker?
>>
>>drivetype() ?
>
>It reacts immediately. However, the response is not 1 (what would imply No Drive), but 4. So, it would not stop the routine from continuing the exploration of the drive.
Some other test you can run with boolean shortcut only on drivetype 4 ? Pinging the machine, adir() a known filename or ask some WINAPI/WSH disk function ?
There should also be a way to query the WSH for available disk letters - dunno if that encompasses mapped drives.
HTH
thomas
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only