tags:

views:

139

answers:

1

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());
A: 

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.

Jack B Nimble