Description
Use the LegalTrademarks
property to get the trademarks that apply to the file.
Declaration
aqFileVersionInfoObj.LegalTrademarks(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 holding the trademarks applicable to the file.
Remarks
If you use Python or DelphiScript, you should enclose the parameter of the LegalTrademarks
property in square brackets: LegalTrademarks[Index]
.
Example
The following example posts information about Notepad’s trademarks 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("Trademarks: " + VerInfo.LegalTrademarks);
}
Python
def VersionInfoSample():
FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe"
# Obtains information about the notepad.exe file
VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo
Log.Message("Trademarks: " + str(VerInfo.LegalTrademarks[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 "Trademarks: " & VerInfo.LegalTrademarks
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('Trademarks: ' + VerInfo.LegalTrademarks);
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"]("Trademarks: " + VerInfo["LegalTrademarks"]);
}