PrivateBuild Property

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

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

Declaration

aqFileVersionInfoObj.PrivateBuild(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 specifies how the file differs from its standard version.

Remarks

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

Example

The following example posts Notepad’s private build number to the test log:

JavaScript, JScript

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

  // Obtains information about the notepad.exe file
  var VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo;

  Log.Message("Private build: " + VerInfo.PrivateBuild);
}

Python

def VersionInfoSample():
  FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe"
  # Obtains information about the notepad.exe file
  VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo
  Log.Message("Private build: " + str(VerInfo.PrivateBuild[0]))

VBScript

Sub VersionInfoSample
  Dim FileName, VerInfo

  FileName = Sys.OSInfo.WindowsDirectory & "\notepad.exe"

  ' Obtains information about the notepad.exe file
  Set VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo

  Log.Message "Private build: " & VerInfo.PrivateBuild
End Sub

DelphiScript

procedure VersionInfoSample;
var FileName, VerInfo;
begin
  FileName := Sys.OSInfo.WindowsDirectory + '\notepad.exe';

  // Obtains information about the notepad.exe file
  VerInfo := aqFileSystem.GetFileInfo(FileName).VersionInfo;

  Log.Message('Private build: ' + VerInfo.PrivateBuild);
end;

C++Script, C#Script

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

  // Obtains information about the notepad.exe file
  var VerInfo = aqFileSystem["GetFileInfo"](FileName)["VersionInfo"];

  Log["Message"]("Private build: " + VerInfo["PrivateBuild"]);
}

See Also

FileFlags Property
SpecialBuild Property
Languages Property

Highlight search results