识别使用C#的CPU体系结构类型 [英] Identifying the CPU architecture type using C#
本文介绍了识别使用C#的CPU体系结构类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要检查它的CPU架构是用户运行,它是
i386或X64或AMD64。我想这样做在C#。
我知道我可以尝试WMI或注册。有没有除了这两任何其他方式?
我的项目目标.NET 2.0!
I want to check which CPU architecture is the user running, is it i386 or X64 or AMD64. I want to do it in C#. I know i can try WMI or Registry. Is there any other way apart from these two? My project targets .NET 2.0!
推荐答案
您也可以尝试(仅如果它没有操纵工程):
You could also try (only works if it's not manipulated):
System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
这篇关于识别使用C#的CPU体系结构类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文