Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identifying the CPU architecture type using C#

Tags:

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!

like image 848
Anirudh Goel Avatar asked Apr 20 '09 09:04

Anirudh Goel


People also ask

What do you mean by CPU architecture?

In computer engineering, computer architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer systems. The architecture of a system refers to its structure in terms of separately specified components of that system and their interrelationships.


1 Answers

You could also try (only works if it's not manipulated):

System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE") 
like image 60
mmx Avatar answered Oct 09 '22 20:10

mmx