//获取硬盘ID
string _HDInfo="";
ManagementClass cimobject1 = new ManagementClass("Win32_DiskDrive");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach(ManagementObject mo in moc1)
{
_HDInfo = (string)mo.Properties["Model"].Value;
}
HDInfo=_HDInfo;
}
#endregion
string _HDInfo="";
ManagementClass cimobject1 = new ManagementClass("Win32_DiskDrive");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach(ManagementObject mo in moc1)
{
_HDInfo = (string)mo.Properties["Model"].Value;
}
HDInfo=_HDInfo;
}
#endregion