日期:2014-05-19  浏览次数:20711 次

CPU,硬盘ID??
我用C#获得了客户端的CPU   和   硬盘的ID   可是我怎么才能从ID中分析出CPU产家,型号,频率和硬盘的型号,容量呢??
例:cpu序列号:0000005500000F12  
硬盘序列号:IC25N040ATMR04  
这是我获得的ID号,请高手指教,谢谢!!

------解决方案--------------------
▲【C#中获取cpu序列号,硬盘ID,网卡MAC地址】▲
private void GetInfo()
{
string cpuInfo = " ";//cpu序列号
ManagementClass cimobject = new ManagementClass( "Win32_Processor ");
ManagementObjectCollection moc = cimobject.GetInstances();
foreach(ManagementObject mo in moc)
{
cpuInfo = mo.Properties[ "ProcessorId "].Value.ToString();
Response.Write ( "cpu序列号: "+cpuInfo.ToString ());
}

//获取硬盘ID
String HDid;
ManagementClass cimobject1 = new ManagementClass( "Win32_DiskDrive ");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach(ManagementObject mo in moc1)
{
HDid = (string)mo.Properties[ "Model "].Value;
Response.Write ( "硬盘序列号: "+HDid.ToString ());
}