GetOSVersion
The GetOSVersion() function returns information about the current version of Windows.
Parameters
This function has no parameters.
Returns
This function returns a string in the MAJOR.MINOR.BUILD_NUMBER.PLATFORM_ID OS_STRING format.
MAJOR is one the following values:
Windows Vista
Windows Server 2008
Windows Server 2003
Windows XP
Windows 2000
Windows NT 4.0
MINOR is one of the following values:
Windows Vista
Windows Server 2008
Windows Server 2003
Windows XP
Windows 2000
Windows NT 4.0
Windows NT 3.51
BUILD_NUMBER is the build number of the operating system.
PLATFORM_ID assigns 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 information about the operating system such as Service Pack 2.
Examples
if GetOSVersion() = "5.1.0.2 Service Pack 2"
endif
VMware, Inc.
6
6
5
5
5
4
0
0
2
1
0
0
51
then MsgBox "You are running on Windows XP Service Pack 2!"
Chapter 9 Creating ThinApp Scripts
123