Previous - sysFileTemp Section Home - File System Next - sysFolderExist


sysFileVersionInfo ( )

Retrieves the file version information recorded on executables and DLLs.

Using sysFileVersionInfo is the same as right clicking a file in windows explorer, and viewing its version information page.

Usage:

sysFileVersionInfo (object me, string filePath)

Parameters:

filePath (string) - a string specifying the file path to an existing file

Returns:

(Property List)
All property values returned are strings. The following property names could be in the property list:

Example:

-- example shows how to finds the exe registered for a pdf document
-- then checks if        the acrobat application is over version 3
xtRose = xtra("Rosetta").new( )
strArobatExePath = xtRose.sysFindExe( "c:\test.pdf" )
If ( STRINGP(strArobatExePath) ) Then
  plFileVersionInfo = xtRose.sysFileVersionInfo( strArobatExePath )
  nMajorVer = integer( plFileVersionInfo[#ProductVersion].char[1] )
  If ( nMajorVer <= 3 ) Then
    alert "Your acrobat version is too old. Please update your Adobe Acrobat Reader"
  End If
End If

Notes:

The returned property list may contain any, all, or none of the properties listed above. The file version information resources are encoded when the exe or dll is compiled. It is up to the individual software vendor to choose the properties that will be stored in the version information header. When there are multiple languages stored in the version information header, the localized strings is returned.

See Also:

sysFindExe


Previous - sysFileTemp Section Home - File System Next - sysFolderExist