OSVersion()
Syntax
Result = OSVersion()Description
Returns the version of the operating system on which the program has been launched.
'Result' can be one of the following values:#PB_OS_Windows_NT3_51 #PB_OS_Windows_95 #PB_OS_Windows_NT_4 #PB_OS_Windows_98 #PB_OS_Windows_ME #PB_OS_Windows_2000 #PB_OS_Windows_XP #PB_OS_Windows_Server_2003 #PB_OS_Windows_Vista #PB_OS_Windows_Server_2008 #PB_OS_Windows_7 #PB_OS_Windows_Future ; New Windows version (not existing when the program was written)Example:Select OSVersion() Case #PB_OS_Windows_98 MessageRequester("Info", "Windows 98") Case #PB_OS_Windows_2000 MessageRequester("Info", "Windows 2000") Case #PB_OS_Windows_XP MessageRequester("Info", "Windows XP") Default MessageRequester("Info", "Unsupported Windows version") EndSelectNote: the value of these constants are established before the release date of each version, therefore tests such as the one which follows, may be used, in order to catch all versions which are older or newer than a given one:If OsVersion() < #PB_OS_Windows_2000 ; ; All versions older than Windows 2000 ; EndIf
Supported OS
All