File.GetVersionInfo

table File.GetVersionInfo ( 

string Filename )

Description

Returns a table containing the all of the version information for a specific file.

Note: Some files may not have any version information. Program executables and DLLs generally do, though.

Parameters

Filename

(string) The path to the file.

Returns

(table) A table containing the file version information indexed by name. If the version information could not be retrieved (for example, the file wasn't found), nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

If the file exists (and has version information in it), the following information will be stored in the table:

KEY

TYPE

DESCRIPTION

FileVersion

string

The file version, as it appears on the Version tab when you right-click on a file and choose Properties. ("5.0.0.1"). If this information cannot be determined, a blank string is returned.

ProductVersion

string

The version number for the product with which the file is distributed. ("1.0.0.6") If this information cannot be determined, a blank string is returned.

CompanyName

string

The company that produced the file. ("Super Dooper Inc.") If this information cannot be determined, a blank string is returned.

FileDescription

string

A short string describing the file. ("Doopernator program file for XP.") If this information cannot be determined, a blank string is returned.

InternalName

string

The internal name of the file, if one exists. ("Doopernator") If this information cannot be determined, a blank string is returned.

ProductName

string

The name of the product with which the file is distributed. ("Doopernator XP") If this information cannot be determined, a blank string is returned.

LegalCopyright

string

All copyright notices that apply to the file. ("Copyright (C) 2003 Super Dooper Inc.") If this information cannot be determined, a blank string is returned.

LegalTrademarks

string

All trademarks and registered trademarks that apply to the file. ("Doopernator is a registered trademark of Super Dooper Inc., so you better not try calling anything Doopernator or our lawyers will hunt you down like terriers chasing a baleful of mice.") If this information cannot be determined, a blank string is returned.

Comments

string

Additional information. ("For more information, visit www.doopernator.com.") If this information cannot be determined, a blank string is returned.

OriginalFilename

string

The original name of the file, not including a path. This lets an application determine whether a file has been renamed by the user. ("Doopernator.exe") If this information cannot be determined, a blank string is returned.

PrivateBuild

string

Information about the file if it's a private or "internal" version. ("Built by BIGDOG on SUPER22.") If this information cannot be determined, a blank string is returned.

SpecialBuild

string

How this version of the file differs from the standard version if it's a special build. ("Built to test the doopernator optimizer code on PCs running service pack 1 with DirectX 9.1.") If this information cannot be determined, a blank string is returned.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions