win32api.GetVersionEx

tuple = GetVersionEx(format)

Returns the current version of Windows, and information about the environment.

Parameters

format=0 : int

The format of the version info to return. May be 0 (for OSVERSIONINFO) or 1 (for OSVERSIONINFOEX)

Return Value

The return value is a tuple with the following information.

Items

[0] int : majorVersion

Identifies the major version number of the operating system.

[1] int : minorVersion

Identifies the minor version number of the operating system.

[2] int : buildNumber

Identifies the build number of the operating system in the low-order word. (The high-order word contains the major and minor version numbers.)

[3] int : platformId

Identifies the platform supported by the operating system. May be one of VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS or VER_PLATFORM_WIN32_NT

[4] string : version

Contains arbitrary additional information about the operating system.

Return Value

or if the format param is 1, the return value is a tuple with:

Items

[0] int : majorVersion

Identifies the major version number of the operating system.

[1] int : minorVersion

Identifies the minor version number of the operating system.

[2] int : buildNumber

Identifies the build number of the operating system in the low-order word. (The high-order word contains the major and minor version numbers.)

[3] int : platformId

Identifies the platform supported by the operating system. May be one of VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS or VER_PLATFORM_WIN32_NT

[4] string : version

Contains arbitrary additional information about the operating system.

[5] int : wServicePackMajor

Major version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the major version number is 3. If no Service Pack has been installed, the value is zero.

[6] int : wServicePackMinor

Minor version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the minor version number is 0.

[7] int : wSuiteMask

Bit flags that identify the product suites available on the system. This member can be a combination of the VER_SUITE_* values.

[8] int : wProductType

Additional information about the system. This member can be one of the VER_NT_* values.

[9] int : wReserved