ASP.NET obtiene el número de serie del disco duro maestro
Utilice System.Windows.Forms
Utilice System.Windows.Forms
Utilice System.Windows.Forms
Utilice System.Windows.Forms; /p>
Usar System.Windows.Forms
Usar System.Windows.Forms
Usar System.Windows.Forms
Usar Sistema; .Windows.Threading;
Utilice System.Collections.Generic
Utilice System.Management
//Obtenga el disco duro; ID de disco
Cadena HDid;
ManagementClass cimobject1 = new ManagementClass("Win32_DiskDrive");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach (ManagementObject mo en moc1)
{
HDid = (cadena) mo.Properties["Model"].Value;
Consola. WriteLine("Número de serie del disco duro: " + HDid.ToString());
}