How can I get system type by c# code? for example: 32 bit. (win 7 Ent)
Environment.Is64BitOperatingSystem
Environment.Is64BitProcess
Enviromment.OSVersion
And for OSVersion look in this for constructing OS name - OS version realations:
Determine OS using Environment.OSVersion
and this contains the different OS name, OS version relations:
http://www.nirmaltv.com/2009/08/17/windows-os-version-numbers/
Lastly, if you don't want to do all that code yourself, you could use this code (which will get you edition etc. but is not based on Environment):
http://www.csharp411.com/determine-windows-version-and-edition-with-c/
Checkout the IntPtr.Size property:
The value of this property is 4 on a 32-bit platform, and 8 on a 64-bit platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With