开发者

Get full CPU name without WMI

开发者 https://www.devze.com 2022-12-21 17:43 出处:网络
Does anyone know if it\'s possible to get the full processor name (as shown in Control Panel | System) without using WMI? I\'m guessing there\'s some un开发者_开发百科managed call you can make.

Does anyone know if it's possible to get the full processor name (as shown in Control Panel | System) without using WMI? I'm guessing there's some un开发者_开发百科managed call you can make.

WMI does the job, but I'm finding it intermittently crashes or locks up on some computers.


You should just be able to check the registry: HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\ProcessorNameString should give it to you

Here is some example code:

var key = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DESCRIPTION\System\CentralProcessor\0\");
var processorName = key.GetValue("ProcessorNameString");
Console.WriteLine(processorName);
0

精彩评论

暂无评论...
验证码 换一张
取 消