Finding USB drive letter with VBScript

前端 未结 2 960
眼角桃花
眼角桃花 2020-12-11 13:31

I found this script on http://network-blog.lan-secure.com/2008/03/usb-detection-using-wmi-script.html

 strComputer = \".\" \'(Any computer name or address)
          


        
2条回答
  •  渐次进展
    2020-12-11 14:16

    colDrives is a collection of all connected drives, not last connected only. Should be:

    strDriveLetter = ""
    For Each objDrive in colDrives
      strDriveLetter = strDriveLetter  & objDrive.DeviceID
    Next
    

提交回复
热议问题