5.1

Table Of Contents
VMware, Inc. 89
Chapter 8 Creating ThinApp Scripts
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:
MINOR is one of the following values:
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"
then MsgBox "You are running on Windows XP Service Pack 2!"
endif
Windows Vista 6
Windows Server 2008 6
Windows Server 2003 5
Windows XP 5
Windows 2000 5
Windows NT 4.0 4
Windows Vista 0
Windows Server 2008 0
Windows Server 2003 2
Windows XP 1
Windows 2000 0
Windows NT 4.0 0
Windows NT 3.51 51