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?
Yes WMI is the best way to do this kind of stuff You can use this to retrieve OS informations :
To determine the operating system use this code:
To determine the CPU name and type first add System.Management reference to your project, then you can use this code:
Look at the ManagementClass class: http://msdn.microsoft.com/en-us/library/system.management.managementclass.aspx
Retrieving OS info:
Retrieving CPU info: