Determine operating system and processor type in C#

Viewed 19794

I want to check what type of operating system i use and what kind of processor. this should be check on run time. i tried using

System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")

and

System.OperatingSystem osInfo2 = System.Environment.OSVersion;
Console.WriteLine(osInfo2.ToString());

but it's just the enviroment that VS is running on.
I was told to use WMI to check it but i can't find out how. can someone help me with that?

4 Answers
Related