To determine the version of the operating system in Delphi, use the following constants defined in SysUtils.
Vista (or higher)
Win32MajorVersion = 6
Server 2003
Win32MajorVersion = 5
Win32MinorVersion = 2
XP
Win32MajorVersion = 5
Win32MinorVersion = 1
2000
Win32MajorVersion = 5
Win32MinorVersion = 0
ME
Win32MajorVersion = 4
Win32MinorVersion = 90
98
Win32MajorVersion = 4
Win32MinorVersion = 10
NT4
Win32MajorVersion = 4
Win32MinorVersion = 0
Win32Platform = VER_PLATFORM_WIN32_NT
95
Win32MajorVersion = 4
Win32MinorVersion = 0
Win32Platform = VER_PLATFORM_WIN32_WINDOWS
- Win32MajorVersion
- Win32MinorVersion
- Win32Platform
Vista (or higher)
Win32MajorVersion = 6
Server 2003
Win32MajorVersion = 5
Win32MinorVersion = 2
XP
Win32MajorVersion = 5
Win32MinorVersion = 1
2000
Win32MajorVersion = 5
Win32MinorVersion = 0
ME
Win32MajorVersion = 4
Win32MinorVersion = 90
98
Win32MajorVersion = 4
Win32MinorVersion = 10
NT4
Win32MajorVersion = 4
Win32MinorVersion = 0
Win32Platform = VER_PLATFORM_WIN32_NT
95
Win32MajorVersion = 4
Win32MinorVersion = 0
Win32Platform = VER_PLATFORM_WIN32_WINDOWS