FileBuildVersion Property

Applies to TestComplete 14.72, last modified on December 24, 2020

Description

Use the FileBuildVersion property to get the build part of the file’s version number.

Property Value

An integer value that represents the file’s build number.

Declaration

aqFileVersionInfoObj.FileBuildVersion

Read-Only Property Integer
aqFileVersionInfoObj An expression, variable or parameter that specifies a reference to an aqFileVersionInfo object

Applies To

The property is applied to the following object:

Property Value

An integer value that represents the file’s build number.

Example

The following example logs Notepad’s version number along with its individual parts:

JavaScript, JScript

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

  Log.Message("Full version: " + VerInfo.FileFullVersion);
  Log.Message("Major version: " + VerInfo.FileMajorVersion);
  Log.Message("Minor version: " + VerInfo.FileMinorVersion);
  Log.Message("Build: " + VerInfo.FileBuildVersion);
  Log.Message("Revision: " + VerInfo.FileRevisionVersion);
}

Python

def VersionInfoSample():
  FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe"
  VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo
  Log.Message("Full version: " + str(VerInfo.FileFullVersion[0]))
  Log.Message("Major version: " + str(VerInfo.FileMajorVersion))
  Log.Message("Minor version: " + str(VerInfo.FileMinorVersion))
  Log.Message("Build: " + str(VerInfo.FileBuildVersion))
  Log.Message("Revision: " + str(VerInfo.FileRevisionVersion))

VBScript

Sub VersionInfoSample
  Dim FileName, VerInfo

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

  Log.Message "Full version: " & VerInfo.FileFullVersion
  Log.Message "Major version: " & VerInfo.FileMajorVersion
  Log.Message "Minor version: " & VerInfo.FileMinorVersion
  Log.Message "Build: " & VerInfo.FileBuildVersion
  Log.Message "Revision: " & VerInfo.FileRevisionVersion
End Sub

DelphiScript

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

  Log.Message('Full version: ' + VerInfo.FileFullVersion);
  Log.Message('Major version: ' + VarToStr(VerInfo.FileMajorVersion));
  Log.Message('Minor version: ' + VarToStr(VerInfo.FileMinorVersion));
  Log.Message('Build: ' + VarToStr(VerInfo.FileBuildVersion));
  Log.Message('Revision: ' + VarToStr(VerInfo.FileRevisionVersion));
end;

C++Script, C#Script

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

  Log["Message"]("Full version: " + VerInfo["FileFullVersion"]);
  Log["Message"]("Major version: " + VerInfo["FileMajorVersion"]);
  Log["Message"]("Minor version: " + VerInfo["FileMinorVersion"]);
  Log["Message"]("Build: " + VerInfo["FileBuildVersion"]);
  Log["Message"]("Revision: " + VerInfo["FileRevisionVersion"]);
}

See Also

FileMajorVersion Property
FileMinorVersion Property
FileRevisionVersion Property
FileFullVersion Property

Highlight search results