ivan Posted February 13, 2006 Posted February 13, 2006 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 IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
rambo3889 Posted February 13, 2006 Posted February 13, 2006 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! youre the best in town Fight!
ivan Posted February 13, 2006 Author Posted February 13, 2006 Not really, but thx DriveGetDrive ( "REMOVABLE" ) works for floppy and flash memories, not for printers, or other devices. I'm trying the registry at the moment Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
foggw Posted February 14, 2006 Posted February 14, 2006 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 IVAN 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("--------------------------------------") LogIt("Caption: " & $objItem.Caption) LogIt("DeviceId: " & $objItem.DeviceID) Next Endif ; ---------------------------------------------------- Func LogIt($sText) ConsoleWrite($sText & @LF) EndFunc 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 Bill
ivan Posted February 14, 2006 Author Posted February 14, 2006 Bill, you rock mate! I certainly can use this, it's really helpful. Thx Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now