When checking for the existence of a drive letter, I have been using the _DIREXISTS function.
For example:
IF _DIREXISTS(D:) then
PRINT "Drive letter D: exists on this system"
END IF
However, if a drive is BitLocker protected AND that drive is currently locked, then the _DIREXISTS for that drive letter will return false leading to the erroneous conclusion that the drive letter is available.
To work around this, if _DIREXISTS returns false, I always follow up by running a "manage-bde -status D:" (or whatever drive letter) via a SHELL command and capturing / parsing the output.
So, this leads me to my question: Is there any more foolproof way to determine a drive letter's existence? There is the _DIREXISTS function, as well as the _FILEEXISTS function, but no _DRIVEEXISTS function or anything similar as far as I can tell. My workaround works, just wondering if there is a more direct test of the existence of a drive letter.