Returns a version information string of a file.
GETFILEVERSION ("file name","versionfield")
Identifies the file for which you want to get the version string.
Optional parameter identifying the specific version information field that should be retrieved. By default, the FileVersion field is returned. Possible values for this field are :
BinFileVersion Returns a string representation of the binary file version information (e.g.: "184.108.40.206").
BinProductVersion Returns a string representation of the binary product version information (e.g.: "220.127.116.11").
Comments This field contains any additional information that should be displayed for diagnostic purposes.
CompanyName This field identifies the company that produced the file. For example, "Microsoft Corporation" or "Standard Microsystems Corporation, Inc."
FileDescription This field describes the file in such a way that it can be presented to users. This string may be presented in a list box when the user is choosing files to install. For example, "Keyboard driver for AT-style keyboards" or "Microsoft Word for Windows".
FileVersion This field member identifies the version of this file. For example, "3.00A" or "5.00.RC2".
InternalName This field identifies the file's internal name, if one exists. For example, this string could contain the module name for a dynamic-link library (DLL), a virtual device name for a Windows virtual device, or a device name for an MS-DOS device driver.
Language Full English name of the language of the file specified in the format defined by ISO Standard 639. (example : "0413Dutch (Standard)").
LegalCopyright This field describes all copyright notices, trademarks, and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, trademark numbers, and so on. In English, this string should be in the format "Copyright Microsoft Corp. 1990–1994".
LegalTrademarks This field describes all trademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. In English, this string should be in the format "Windows is a trademark of Microsoft Corporation".
OriginalFilename This field identifies the original name of the file, not including a path. This enables an application to determine whether a file has been renamed by a user. This name may not be MS-DOS 8.3-format if the file is specific to a non-FAT file system.
PrivateBuild This field describes by whom, where, and why this private version of the file was built. For example, "Built by OSCAR on \OSCAR2".
ProductName This field identifies the name of the product with which this file is distributed. For example, this string could be "Microsoft Windows".
ProductVersion This field identifies the version of the product with which this file is distributed. For example, "3.00A" or "5.00.RC2".
SpecialBuild This field describes how this version of the file differs from the normal version. For example, "Private build for Olivetti solving mouse problems on M250 and M250E computers".
A string representing the file version field.
The information returned by this function is the same as the version information displayed in Windows Explorer.
This function applies only to 32-bit Windows – based executable files.
$Result = GetFileVersion(@LDRIVE + "\Kix32.exe")
$Result = GetFileVersion(@LDRIVE + "\Kix32.exe", "ProductVersion" )