Descarga de esta pagina:
Te pedira que metas tu correo
http://www.codeproject.com/KB/system/GetHardwareInformation.aspx
1. Esto para ver el de tu disco:
https://www.codeproject.com/KB/system/GetHardwareInformation/GetHardwareInfo_Exe.zip
- Lo abres como admnistrador
- Le das a "
data storage
"
- En la derecha saldra un select list le marcas
WIN32_DISKDRIVE
- Buscas
SerialNumber
- Te saldra: SerialNumber | 22020202020qwdqwd2020220(EJEMPLO)
2. Usando la libreria y el codigo c#:
A) Podrias probar esta funcion
public static void Main()
{
try
{
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_DiskDrive");
foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("SerialNumber: {0}", queryObj["SerialNumber"]);
Console.WriteLine("Signature: {0}", queryObj["Signature"]);
}
}
catch (ManagementException e)
{
}
}
B) Esta segunda funcion te busca el serial usando Win32_physicalMedia
.MODELO
ManagementObjectSearcher searcher = new
ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
foreach(ManagementObject wmi_HD in searcher.Get())
{
HardDrive hd = new HardDrive();
hd.Model = wmi_HD["Model"].ToString();
hd.Type = wmi_HD["InterfaceType"].ToString();
hdCollection.Add(hd);
}
(http://www.codeproject.com/KB/cs/hard_disk_serialno.aspx)
.SERIAL
searcher = new
ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
int i = 0;
foreach(ManagementObject wmi_HD in searcher.Get())
{
// get the hard drive from collection
// using index
HardDrive hd = (HardDrive)hdCollection[i];
// get the hardware serial no.
if (wmi_HD["SerialNumber"] == null)
hd.SerialNo = "None";
else
hd.SerialNo = wmi_HD["SerialNumber"].ToString();
++i;
}
Fuente de la 2da funcion: http://www.codeproject.com/KB/cs/hard_disk_serialno.aspx