GetOSVersion |
Previous Top Next |
This
function returns a string in the following format:
|
MAJOR.MINOR.BUILD_NUMBER.PLATFORM_ID
OS_STRING |
|
MAJOR
is one the following values |
|
|
MINOR
is one of the following values |
|
|
BUILD_NUMBER
is the build number of the OS |
Windows
Me/98/95: The low-order word contains the build number of the
operating system. The high-order word contains the major and minor
version numbers. |
|
PLATFORM_ID
is one of the following values |
Value
= 1 for Windows Me, Windows 98, or Windows 95 (Windows 95
based OS) |
Value
= 2 for Windows Server 2003, Windows XP, Windows 2000, or
Windows NT. (Windows NT based OS) |
|
OS_STRING
Represents additional information about the OS such as "Service
Pack 2" |
if
GetOSVersion() = "5.1.0.2 Service Pack 2" then
|
MsgBox
"You are running on Windows XP Service Pack 2!" |
endif
|