Re: Need to collect information about USB ports and connected devices

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have found the information in WMI, but not in any of the areas
specified below as they only reflect the actual usb controller
information.

It seems that there is an object called Win32_PnPEntity whch actually
has the data, but I am not sure how to define that in a .MOF file yet.

I am confused as to what Provider to use for the data class.

If anyone can help me with the rest of this mystery, I'd sure appreciate
it!!!


Here's what I have in a VBScript:


strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")
Set colDevices = objWMIService.ExecQuery _
("Select * From Win32_USBControllerDevice")

For Each objDevice in colDevices
strDeviceName = objDevice.Dependent
strQuotes = Chr(34)
strDeviceName = Replace(strDeviceName, strQuotes, "")
arrDeviceNames = Split(strDeviceName, "=")
strDeviceName = arrDeviceNames(1)
Set colUSBDevices = objWMIService.ExecQuery _
("Select * From Win32_PnPEntity Where DeviceID = '" &
strDeviceName & "'")
For Each objUSBDevice in colUSBDevices
Wscript.Echo objUSBDevice.Description
Wscript.Echo objUSBDevice.DeviceID
'Wscript.Echo objUSBDevice.Manufacturer
Next
Next

Mark

On 2006-03-31, garth <someone@xxxxxx> wrote:
The short answer is if the info is within WMI then you can collect the info
with SMS.

I did a quick look and there are three USB WMI class. Does any of these
provide you with the info that you are lookign for?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_usbcontroller.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_usbcontrollerdevice.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_usbhub.asp




"Taxviper" <Taxviper@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EE5A859A-BEB5-4E7A-88B2-6138A824DAB5@xxxxxxxxxxxxxxxx
Hi,

I would like to ask if it's possible to get the SMS-server to collect
information about all the clients USB ports and the connected devices?

I need this information to analyze the use of USB-devices.

If it's possible, could what will this information show - the name of the
device, only connected devices or last connected device and how do I
compose
the search options?

Thanks,

Michael




.



Relevant Pages

  • Re: Mass storage device
    ... What do you mean by 'connected devices'? ... Did Windows install device drivers on the first occasion that the USB case ... > I have access disk management but the drive is not shown there. ...
    (microsoft.public.windowsxp.hardware)
  • Re: recognize a drive as removable media (e.g. compact flash, sd card or usb drive)
    ... such as compact flash, sd card, usb, etc. drive and then upload files ... Under Windows, you can probably use WMI for this, depending on ... to a removable disk. ...
    (comp.lang.python)
  • Re: Mass storage device
    ... under "my computer" properties there are 2 ways to list devices. ... Either a list of configured devices or listed as "connected devices" ... USB 2.0 3.5 inch External Hard Drive Enclosure ... >> I have access disk management but the drive is not shown there. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Port Enumeration
    ... I did manage to do it using wmi. ... "Win32_PnPEntity" and search for particular key words. ... Win32_SerialPort however did not manage to find the same for the USB ... >> available ports (for all serial, usb and parallel ports). ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: USB Problem
    ... I am setting up an older PC for my dad and it has an usb issue - when ... plugging a 4 port hub in and connected devices to that but it just ... recognises the hub and not the attached devices. ...
    (uk.comp.homebuilt)