I want to get processor code name (eg. "Ivy Bridge", "Sandy Bridge") like CPU-Z tool on Windows but from C# code.
1 Answer
Use PROCESSOR_IDENTIFIER environment variable:
var cpuId = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER");
In my case it prints:
// Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
WMI is also another method to get to the same information but this one is simpler.
Bear in mind, you may never be able to get the exact string CPU-Z provides since it is very likely it has a mapping table that reads this environment variable and internally maps to the code name and outputs.
1 Comment
HolaJan
Yes I already using WMI Win32_Processor class to get many others CPU properties I need, but code name is not there. So I can get Model, Stepping etc. The question is whether this table is available somewhere?