Pheeww! Finally. Took me a while. It's not preety but it works Function returns 0 if the drive letter cannot be found. Otherwise it returns the PnpDEVICEID. Note to self: never volunteer again to write scripts that look easy but aren;t #include <String.au3> $test = _GetPNPDeviceID("H:") MsgBox(0, "Hurray", $test) Func _GetPNPDeviceID($drive_letter) Local $drive_letter_found, $drive_letter_found $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colIte