FileFullVersion Property

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

Use the FileFullVersion property to get the version number of the file as a string. To get individual parts of the version number, use the FileMajorVersion, FileMinorVersion, FileBuildVersion and FileRevisionVersion properties.

Declaration

aqFileVersionInfoObj.FileFullVersion(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 holds the file version number. Typically, this string has the following format: “major_number.minor_number.build_number.revision_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
FileBuildVersion Property
FileRevisionVersion Property
Languages Property

Highlight search results