如:
Func DetectDevice()
$USB=DriveGetDrive ( "REMOVABLE" )
If $USB[0]=0 Then
MsgBox(0,"","你未安装U盘?")
Else
$USBMSG=""
for $I=1 to $USB[0]
$USBMSG=$USBMSG&" "&$USB[$i]
Next
MsgBox(0,"","存在"&$USB[0]&"个U盘,盘符是:"&@CRLF&StringUpper($USBMSG))
EndIf
EndFunc ;==>DetectDevice