C#, wmi get disk manufacturer
Posted
by gloris
on Stack Overflow
See other posts from Stack Overflow
or by gloris
Published on 2010-05-03T16:22:58Z
Indexed on
2010/05/03
16:28 UTC
Read the original article
Hit count: 209
Hi,
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());
© Stack Overflow or respective owner