System.GetOSVersionInfo

table System.GetOSVersionInfo ( 

)

Description

Returns a table containing the version information of the operating system the user is running.

Parameters

None.

Returns

(table) A table containing the OS version information indexed by version categories.

KEY

TYPE

DESCRIPTION

MajorVersion

string

The major version number of the OS. If the version was 5.00.2195, "5" would be returned.

MinorVersion

string

The minor version number of the OS. If the version was 5.00.2195, "0" would be returned.

BuildNumber

string

The build number of the OS version. If the version was 5.00.2195, "2195" would be returned.

PlatformId

string

Returns "1" if the OS is non-NT based and "2" if the OS is NT based (XP, Vista, Server "Longhorn", Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, Windows Server 2016).

CSDVersion

string

The name of the most recently installed service pack for the OS, such as "Service Pack 3."

 

Additional table values are available for the following client and server operating systems:
Client:
Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP.
Server:
Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, Windows Server "Longhorn", Windows Server 2003.

Note: If the target operating system is not one of the above mentioned client or server operating systems, -1 will be returned for keys of type number and false for keys of type boolean.

KEY

TYPE

DESCRIPTION

ServicePackMajor

number

The major version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the major version number is 3. If no Service Pack has been installed, the value is zero.

ServicePackMinor

number

The minor version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the minor version number is 0.

ProductType

number

One of the numeric values "1", "2" or "3" will be returned. These values are defined as follows:
1 - The system is running Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows XP Home Edition.

2 - The system is a domain controller.

3 - The system is a server.

BackOffice

boolean

Whether or not Microsoft BackOffice components are installed. If they are installed the value true is returned. If they are not installed, false is returned.

Blade

boolean

Whether or not Windows Server 2003, Web Edition is installed. If it is installed the value true is returned. If it is not installed, false is returned.

ComputeServer

boolean

Whether Windows Server 2003, Compute Cluster Edition is installed.

DataCenter

boolean

Whether or not Windows Server 2008 Datacenter Edition, or Windows Server 2003 Datacenter Edition is installed. If one of them is installed, the value true is returned. If none are installed, false is returned.

Enterprise

boolean

Whether or not Windows Server Enterprise, Windows Server 2003, Enterprise Edition, Windows Server 2008 Enterprise is installed. If one of them is installed, the value true is returned. If none are installed, false is returned.

EmbeddedNT

boolean

Whether or not Windows XP Embedded is installed.

Personal

boolean

Whether or not Windows Vista Home Premium, Windows Vista Home Basic, or Windows XP Home Edition is installed. If it is installed, the value true is returned. If it is not installed, false is returned.

SingleUserTerminalService

boolean

Whether or not Terminal Services is installed, but only one interactive session is supported. If only one interactive session is supported, the value true is returned. If Terminal Services is not installed, or supports more than one interactive session, false is returned.

SmallBusiness

boolean

Whether or not Microsoft Small Business Server was once installed on the system, but may have been upgraded to another version of Windows. If it was installed at some point, the value true is returned. If it was never installed, false is returned.

SmallBusinessRestricted

boolean

Whether or not Microsoft Small Business Server is installed with the restrictive client license in force. If it is installed with the restrictive client license in force, the value true is returned. If it is not, false is returned.

Terminal

boolean

Whether or not Terminal Services is installed. If it is installed, the value true is returned. If it is not installed, false is returned.

Communications

boolean

Whether or not Communication components are installed. If they are installed, the value true is returned. If they are not installed, false is returned.

Server2003R2

boolean

Whether or not the operating system is Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed. If it is, true is returned. If it is not, false is returned.

XPMediaCenterEdition

boolean

Whether or not the operating system is Windows XP Media Center Edition. If it is, true is returned. If it is not, false is returned.

StarterEdition

boolean

Whether or not the operating system is Windows 7 Starter Edition, Windows Vista Starter, or Windows XP Starter Edition. If it is, true is returned. If it is not, false is returned.

TabletPCEdition

boolean

Returns true if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows Vista, Windows 7 and the Tablet PC Input service is started. Otherwise returns false.

If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions