Reputation: 4126
how get USB flash(key) manufacturer name with C#?
for example WD, Hama, Kingston...
Now i with: "disk["Manufacturer"]", get: "Standard disk driver"
string drive = "h";
ManagementObject disk = new ManagementObject("Win32_LogicalDisk.DeviceID=\"" + drive + ":\"");
disk.Get();
Console.WriteLine(disk["VolumeSerialNumber"].ToString());
Console.WriteLine(disk["VolumeName"].ToString());
Console.WriteLine(disk["Manufacturer"].ToString());
Upvotes: 1
Views: 4238
Reputation: 5087
Use Win32_DiskDrive. Model may or may not include the name of the manufacturer, but with the model number (or serial number) you can extrapolate the manufacturer.
Also see this CodeProject which demonstrates use.
Upvotes: 1