Sign in to follow this  
Followers 0

List USB connected devices

5 posts in this topic

Thinks this will work:

DriveGetDrive ( "REMOVABLE" )

My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post

Link to post
Share on other sites

Does any one know how I can list the currently connected devices to USB ports? I.e, Flash memory sticks, printers, mobile phone (cables), cameras, etc

Thanks in advance


How 'bout (trimmed down from Scriptomatic)

$strComputer = "."
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity where DeviceID like 'USB\\%'")

If IsObj($colItems) then
    For $objItem In $colItems
        LogIt("Caption: " & $objItem.Caption)
        LogIt("DeviceId: " & $objItem.DeviceID)
; ----------------------------------------------------

Func LogIt($sText)
    ConsoleWrite($sText & @LF)

The 'LogIt' function is for use with Scite it just displays info the display pane.

If you need more info, Google Win32_PnpEntity and/or the AutoIt Scriptomatic.

AutoIt Scriptomatic


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0