SpecialBuild Property

Applies to TestComplete 15.68, last modified on October 16, 2024

Description

Use the SpecialBuild property to get the special build information for the file. To check if a file is a special build or a standard version, use the FileFlags property.

Declaration

aqFileVersionInfoObj.SpecialBuild(Index)

Read-Only Property String
aqFileVersionInfoObj An expression, variable or parameter that specifies a reference to an aqFileVersionInfo object
Index [in]    Optional    Integer Default value: 0   

Applies To

The property is applied to the following object:

Parameters

The property has the following parameter:

Index

A file can contain multiple version information blocks translated in different languages. This parameter specifies a zero-based index of the desired version information translation, among those included in the file. The default value is 0, which means the default version information block. To get the total number of version information translations in a file, use the Languages property.

Property Value

A string that describes how this version of the file differs from the standard version.

Remarks

If you use Python or DelphiScript, you should enclose the parameter of the SpecialBuild property in square brackets: SpecialBuild[Index].

Example

The following example checks if a file is a special build and if so, posts the special build information to the test log:

JavaScript, JScript

function VersionInfoSample()
{
  var FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe";
  var VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo;

  if ((VerInfo.FileFlags & VS_FF_SPECIALBUILD) == VS_FF_SPECIALBUILD)
    Log.Message("The file is a special build:" + VerInfo.SpecialBuild)
  else
    Log.Message("The file is not a special build.");
}

Python

def VersionInfoSample():
  FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe"
  VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo
  if (VerInfo.FileFlags & VS_FF_SPECIALBUILD) == VS_FF_SPECIALBUILD:
    Log.Message("The file is a special build:" + str(VerInfo.SpecialBuild))
  else:
    Log.Message("The file is not a special build.")

VBScript

Sub VersionInfoSample
  Dim FileName, VerInfo

  FileName = Sys.OSInfo.WindowsDirectory & "\notepad.exe"
  Set VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo

  If (VerInfo.FileFlags And VS_FF_SPECIALBUILD) = VS_FF_SPECIALBUILD Then
    Log.Message "The file is a special build:" & VerInfo.SpecialBuild
  Else
    Log.Message "The file is not a special build."
  End If
End Sub

DelphiScript

procedure VersionInfoSample;
var FileName, VerInfo;
begin
  FileName := Sys.OSInfo.WindowsDirectory + '\notepad.exe';
  VerInfo := aqFileSystem.GetFileInfo(FileName).VersionInfo;

  if (VerInfo.FileFlags and VS_FF_SPECIALBUILD) = VS_FF_SPECIALBUILD then
    Log.Message('The file is a special build:' + VerInfo.SpecialBuild)
  else
    Log.Message('The file is not a special build.');
end;

C++Script, C#Script

function VersionInfoSample()
{
  var FileName = Sys["OSInfo"]["WindowsDirectory"] + "\\notepad.exe";
  var VerInfo = aqFileSystem["GetFileInfo"](FileName)["VersionInfo"];

  if ((VerInfo["FileFlags"] & VS_FF_SPECIALBUILD) == VS_FF_SPECIALBUILD)
    Log["Message"]("The file is a special build:" + VerInfo["SpecialBuild"])
  else
    Log["Message"]("The file is not a special build.");
}

See Also

FileFlags Property
PrivateBuild Property
Languages Property

Highlight search results