Show / Hide Table of Contents

Class osVersion

Provides Windows version info and current process 32/64 bit info.

public static class osVersion
Remarks

The Windows version properties return true Windows version. If you need version that depends on manifest and debugger, use System.Environment.OSVersion.


Namespace: Au
Assembly: Au.dll
Inheritance
object
osVersion

Fields

Name Description
win10

Windows version major+minor value that can be used with osVersion.winVer. Example: if (osVersion.winVer >= osVersion.win8) ...

win7

Windows version major+minor value that can be used with osVersion.winVer. Example: if (osVersion.winVer >= osVersion.win8) ...

win8

Windows version major+minor value that can be used with osVersion.winVer. Example: if (osVersion.winVer >= osVersion.win8) ...

win8_1

Windows version major+minor value that can be used with osVersion.winVer. Example: if (osVersion.winVer >= osVersion.win8) ...

Properties

Name Description
is32BitOS

true if Windows 32-bit, false if 64-bit (x64 or ARM64).

is32BitProcess

true if this process is 32-bit, false if 64-bit (x64 or ARM64). The same as sizeof(nint) == 4.

is32BitProcessAnd64BitOS

Returns true if this process is a 32-bit process running on 64-bit Windows. Also known as WOW64 process.

isArm64OS

true if Windows ARM64.

isArm64Process

true if this process is ARM64.

minWin10

true if Windows 10 or later.

minWin10_1607

true if Windows 10 version 1607 or later.

minWin10_1703

true if Windows 10 version 1703 or later.

minWin10_1709

true if Windows 10 version 1709 or later.

minWin10_1803

true if Windows 10 version 1803 or later.

minWin10_1809

true if Windows 10 version 1809 or later.

minWin10_1903

true if Windows 10 version 1903 or later.

minWin10_1909

true if Windows 10 version 1909 or later.

minWin10_2004

true if Windows 10 version 2004 or later.

minWin10_20H2

true if Windows 10 version 20H2 or later.

minWin10_21H1

true if Windows 10 version 21H1 or later.

minWin10_21H2

true if Windows 10 version 21H2 or later.

minWin10_22H2

true if Windows 10 version 22H2 or later.

minWin11

true if Windows 11 or later.

minWin11_22H2

true if Windows 11 version 22H2 or later.

minWin11_23H2

true if Windows 11 version 23H2 or later.

minWin11_24H2

true if Windows 11 version 24H2 or later.

minWin8

true if Windows 8.0 or later.

minWin8_1

true if Windows 8.1 or later.

onaString

Gets string containing OS version, .NET version and Au.dll version, like "10.0.22621-64|6.0.8|1.2.3". Can be used for example to rebuild various caches when it's changed.

winBuild

Gets Windows build number. For example 14393 for Windows 10 version 1607.

winMajor

Gets Windows major version.

winMinor

Gets Windows minor version.

winVer

Gets Windows major and minor version in single int:

  • Win7 - 0x601,
  • Win8 - 0x602,
  • Win8.1 - 0x603,
  • Win10/11 - 0xA00.

Example: if (osVersion.winVer >= osVersion.win8) ...

See Also

System.OperatingSystem
System.Runtime.InteropServices.RuntimeInformation