Platform

Description:              This function returns a twelve element structure that indicates the platform under which VTS is currently running.

Returns:                    Structure – see comments

Usage:                       Script

Format:                      Platform()

Parameters:             None

Comments:               The return value for this function is a twelve element structure in which the elements have the following meanings:

Element

Value

PlatformId

0 = Windows ME, Windows 98 SE, Windows 95

1  = Windows NT, Windows 2000, Windows XP,

       Windows Server 2003, Windows Server 2008,

       Windows Vista, Windows 7

MajorVersion

Major version number

MinorVersion

Minor version number

ProductType

Additional information about the system.

SuiteMask

Identifies the product suites available on the system.

For a list of the codes and their meanings, please refer to

http://msdn2.microsoft.com/en-us/library/ms724833.aspx

BuildNumber

The build number of the operating system

SPName

Service Pack Name

SPMajorVersion

Major version # of latest service pack installed

SPMinorVersion

Minor version # of latest service pack installed

ProductInfo

For a list of the codes and their meanings, please refer to

http://msdn2.microsoft.com/en-us/library/ms724358.aspx

CPUArchitecture

A 0 indicates x86 architecture, while a 9 indicates x64 architecture

NumberOfCPUs

The number of processors in the machine.

 

                             Some common names and their major and minor versions are as follows:

Common Name 

Type 

Major Version 

Minor Version

Windows 95 

Windows 

0

Windows 98 

Windows 

10

NT 3.51 

Windows NT 

51

NT 4 

Windows NT 

0

Windows 2000, NT 5 

Windows 2000 

0

Windows XP 

Windows 

1

Windows XP Pro. 64

Windows

5

2

Windows Server 2003

 

5

2

Windows Vista

 

6

0

Windows 7

 

6

1

Windows Server 2008

 

6

0

          Prior to VTS 8.0, this function returned a three element array.  Backwards compatibility has been maintained so that code designed to use the earlier version of this function will still work properly.

 

Example:

If 1 Main;

[

  p = Platform(); 

    IfThen(p\MajorVersion == 6 && p\MinorVersion == 0

 && p\ProductType == 1,

           UsingVista = 1;

    );

];

This script checks to see if the platform is Windows Vista

See Also:

WkStaInfo