Hi,
i´ve a problem with usb devices and WMI. I´m writing a program (c#) to identify usb devices. Now i´ve to know the drive letter, the usb interal serial number (not the one, which Windows creates) and the VID/PID of the device. With WMI i´m able to read the drive letter and the internal serial number of all connected devices. But i can´t read the drive letter and the serial number only of the device i´ve connected at this moment.
Does anybody know, how to read out the three properties of a just connected usb device?
P.S.: I hope, this is the right forum to ask...
Loading
L TigerPosted Sep 2, 2009, 3:05 PM
now i´ve the code to determine the Signature, the VolumeSerialNumber and the drive letter of a connected usb device (WMI classes UsbControllerDevice, DiskDrive and LogicalDisk). But now i´ve to know the VID/PID or the usb classes (HID, Biometrics,...) of the device. Does anybody know how to figure out the VID/PID or the usb classes out of the known properties (signature, volumeserialnumber, drive letter)?
L TigerPosted Aug 30, 2009, 11:19 AM
i´ve tested the code with ten usb devices. But no SerialNumber was displayed at every device and the PID/VID isn´t there, too :(
EDIT:
Ok, i found out, that the SerialNumber is not available in Windows XP and earlier.
Instead of the SerialNumber the Signature will be a better option for XP and later. I´ll post the code, when i´ve tested it...
Roei BarPosted Aug 29, 2009, 4:41 PM
dont forget to mark this as "Accepted Answer"