How to fast get Hardware-ID in C#?
问题 I need in my program to tie a license to a hardware ID. I tried use WMI, but it still slow. I need, for example, CPU, HDD, and motherboard info. 回答1: For more details refer to this link The following code will give you CPU ID: namespace required System.Management var mbs = new ManagementObjectSearcher("Select ProcessorId From Win32_processor"); ManagementObjectCollection mbsList = mbs.Get(); string id = ""; foreach (ManagementObject mo in mbsList) { id = mo["ProcessorId"].ToString(); break; }