aqEnvironment.GetWinAdditionalInfo Method

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

Use the GetWinAdditionalInfo method to determine the latest service pack installed in the currently running operating system.

Declaration

aqEnvironment.GetWinAdditionalInfo()

Result String

Applies To

The method is applied to the following object:

Result Value

A string that indicates the latest service pack installed in the operating system. If no service pack is installed, the method returns an empty string.

Example

The following code demonstrates how you can obtain additional information about the operating system you are currently using.

JavaScript, JScript

function OSInformation()
{
 // Gets additional information about your operating system
 var AddInfo = aqEnvironment.GetWinAdditionalInfo();
 Log.Message("You are using Microsoft Windows operating system with the " + AddInfo + " installed");

 // Gets information about your operating system's major version
 var MajVer = aqEnvironment.GetWinMajorVersion();
 // Gets information about your operating system's minor version
 var MinVer = aqEnvironment.GetWinMinorVersion();
 // Gets information about your operating system's build number
 var Build = aqEnvironment.GetWinVersionBuild();
 // Posts the information about your system to the test log
 Log.Message("The OS version you are using is " + MajVer + "." + MinVer + "." + Build );
}

Python

def OSInformation():
  # Gets additional information about your operating system
  AddInfo = aqEnvironment.GetWinAdditionalInfo()
  Log.Message("You are using Microsoft Windows operating system with the " + AddInfo + " installed")
  # Gets information about your operating system's major version
  MajVer = aqEnvironment.GetWinMajorVersion()
  # Gets information about your operating system's minor version
  MinVer = aqEnvironment.GetWinMinorVersion()
  # Gets information about your operating system's build number
  Build = aqEnvironment.GetWinVersionBuild()
  # Posts the information about your system to the test log
  Log.Message("The OS version you are using is " + str(MajVer) + "." + str(MinVer) + "." + str(Build) )

VBScript

Sub OSInformation


 ' Gets additional information about your operating system
 AddInfo = aqEnvironment.GetWinAdditionalInfo()
 Call Log.Message("You are using Microsoft Windows operating system with the " + AddInfo + " installed")

 ' Gets information about your operating system's major version
 MajVerNum = aqEnvironment.GetWinMajorVersion()
 ' Converts the version number to a string
 MajVerStr = aqConvert.IntToStr(MajVerNum)

 ' Gets information about your operating system's minor version
 MinVerNum = aqEnvironment.GetWinMinorVersion()
 ' Converts the version number to a string
 MinVerStr = aqConvert.IntToStr(MinVerNum)

 ' Gets information about your operating system's build number
 BuildNum = aqEnvironment.GetWinVersionBuild()
 ' Converts the build number to a string
 BuildStr = aqConvert.IntToStr(BuildNum)

 ' Posts the information about your system to the test log
 Call Log.Message("The OS version you are using is " + MajVerStr + "." + MinVerStr + "." + BuildStr)

End Sub

DelphiScript

function OSInformation;
var AddInfo, MajVerNum, MajVerStr, MinVerNum, MinVerStr, BuildNum, Buildstr;
begin

 // Gets additional information about your operating system
 AddInfo := aqEnvironment.GetWinAdditionalInfo();
 Log.Message('You are using Microsoft Windows operating system with the ' + AddInfo + ' installed');

 // Gets information about your operating system's major version
 MajVerNum := aqEnvironment.GetWinMajorVersion();
 // Converts the version number to a string
 MajVerStr := aqConvert.IntToStr(MajVerNum);
 // Gets information about your operating system's minor version
 MinjVerNum := aqEnvironment.GetWinMinorVersion();
 // Converts the version number to a string
 MinVerStr := aqConvert.IntToStr(MinVerNum);
 // Gets information about your operating system's build number
 BuildNum := aqEnvironment.GetWinVersionBuild();
 // Converts the build number to a string
 BuildStr := aqConvert.IntToStr(BuildNum);
 // Posts the information about your system to the test log
 Log.Message('The OS version you are using is ' + MajVerStr + '.' + MinVerStr + '.' + BuildStr);

end;

C++Script, C#Script

function OSInformation()
{
 // Gets additional information about your operating system
 var AddInfo = aqEnvironment["GetWinAdditionalInfo"]();
 Log["Message"]("You are using Microsoft Windows operating system with the " + AddInfo + " installed");

 // Gets information about your operating system's major version
 var MajVer = aqEnvironment["GetWinMajorVersion"]();
 // Gets information about your operating system's minor version
 var MinVer = aqEnvironment["GetWinMinorVersion"]();
 // Gets information about your operating system's build number
 var Build = aqEnvironment["GetWinVersionBuild"]();
 // Posts the information about your system to the test log
 Log["Message"]("The OS version you are using is " + MajVer + "." + MinVer + "." + Build );
}

See Also

aqEnvironment.GetWinMinorVersion Method
aqEnvironment.GetWinMajorVersion Method
aqEnvironment.GetWinVersionBuild Method
ServicePackVersion Property

Highlight search results