ProductName Property

Applies to TestComplete 14.74, last modified on March 31, 2021


Use the ProductName property to get the name of the product that the file is associated with.



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:


The property has the following parameter:


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 contains the product name.


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


The following example posts Notepad’s product information to the test log:

JavaScript, JScript

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

  Log.Message("Product name: " + VerInfo.ProductName);
  Log.Message("Product major version: " + VerInfo.ProductMajorVersion);
  Log.Message("Product minor version: " + VerInfo.ProductMinorVersion);
  Log.Message("Product build: " + VerInfo.ProductBuildVersion);
  Log.Message("Product revision: " + VerInfo.ProductRevisionVersion);
  Log.Message("Product full version: " + VerInfo.ProductFullVersion);


def VersionInfoSample():
  FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe"
  VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo
  Log.Message("Product name: " + str(VerInfo.ProductName[0]))
  Log.Message("Product major version: " + str(VerInfo.ProductMajorVersion))
  Log.Message("Product minor version: " + str(VerInfo.ProductMinorVersion))
  Log.Message("Product build: " + str(VerInfo.ProductBuildVersion))
  Log.Message("Product revision: " + str(VerInfo.ProductRevisionVersion))
  Log.Message("Product full version: " + str(VerInfo.ProductFullVersion[0]))


Sub VersionInfoSample
  Dim FileName, VerInfo

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

  Log.Message "Product name: " & VerInfo.ProductName
  Log.Message "Product major version: " & VerInfo.ProductMajorVersion
  Log.Message "Product minor version: " & VerInfo.ProductMinorVersion
  Log.Message "Product build: " & VerInfo.ProductBuildVersion
  Log.Message "Product revision: " & VerInfo.ProductRevisionVersion
  Log.Message "Product full version: " & VerInfo.ProductFullVersion
End Sub


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

  Log.Message('Product name: ' + VerInfo.ProductName);
  Log.Message('Product major version: ' + VarToStr(VerInfo.ProductMajorVersion));
  Log.Message('Product minor version: ' + VarToStr(VerInfo.ProductMinorVersion));
  Log.Message('Product build: ' + VarToStr(VerInfo.ProductBuildVersion));
  Log.Message('Product revision: ' + VarToStr(VerInfo.ProductRevisionVersion));
  Log.Message('Product full version: ' + VerInfo.ProductFullVersion);

C++Script, C#Script

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

  Log["Message"]("Product name: " + VerInfo["ProductName"]);
  Log["Message"]("Product major version: " + VerInfo["ProductMajorVersion"]);
  Log["Message"]("Product minor version: " + VerInfo["ProductMinorVersion"]);
  Log["Message"]("Product build: " + VerInfo["ProductBuildVersion"]);
  Log["Message"]("Product revision: " + VerInfo["ProductRevisionVersion"]);
  Log["Message"]("Product full version: " + VerInfo["ProductFullVersion"]);

See Also

CompanyName Property
ProductMajorVersion Property
ProductMinorVersion Property
ProductBuildVersion Property
ProductRevisionVersion Property
ProductFullVersion Property
Languages Property

Highlight search results