public string GetCPUSerialNo() { string cpuSerialNo = string.Empty; ManagementClass managementClass = new ManagementClass("Win32_Processor"); ManagementObjectCollection managementObjectCollection = managementClass.GetInstances(); foreach (ManagementObject managementObject in managementObjectCollection) { // 可能是有多个 cpuSerialNo = managementObject.Properties["ProcessorId"].Value.ToString(); break; } return cpuSerialNo; }