Platform

(Engine-Level Function)

Description: Returns a fifteen element structure that indicates the platform under which VTScada is currently running.
Returns: Structure - see comments
Usage: Script only.
Function Groups: Network,  Software and Hardware
Related to: WKStaInfo
Format: Platform()
Parameters: None
Comments: The return value for this function is a fifteen 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 of the operating system

MinorVersion

Minor version number of the operating system

ProductType

Additional information about the system.
For a list of the codes and their meanings, refer to http://msdn2.microsoft.com/en-us/library/ms724833.aspx

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

The latest service pack installed on the system

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 processing threads in the machine.

PhysicalMemoryThe amount of physical memory, measured in bytes.
Not the available memory.
InServiceMode TRUE if VTScada has been started in service mode
TempFilePath The path of the directory designated for temporary files

 

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

Common Name 

Major Version 

Minor Version

Windows Server 2012

6

2

Windows 8.1

6

3

Windows 2016

10

0

Windows 2019

10

0

Windows 10

10

0

Windows 11

10

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