How to determine which version of Windows?
How to determine which version of Windows? WinXP, Vista or 7 etc. 32 or 64 bit? UPD: for .Net 2.0 - 3.5 You're looking for the Environment.OSVersion , Environment.Is64BitProcess , and Environment.Is64BitOperatingSystem properties. Before .Net 4.0, you can check whether the process is 64-bit by checking whether IntPtr.Size is 8 , and you can check whether the OS is 64-bit using this code : public static bool Is64BitProcess { get { return IntPtr.Size == 8; } } public static bool Is64BitOperatingSystem { get { // Clearly if this is a 64-bit process we must be on a 64-bit OS. if (Is64BitProcess)