ManagementObjectSearcher USB = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive"); ManagementObjectCollection USBinfo = USB.Get(); string info = ""; foreach (ManagementObject MO in USBinfo) { info = (string)MO["SerialNumber"]; }
Win32_LogicalDisk
VolumeSerialNumber
DriveType
MediaType
PNPDeviceID
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)