Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2783 closed Feature Request (Completed)

FileGetVersion default value for optional parameter is missing in help file

Reported by: orbs Owned by: Melba23
Milestone: Component: Documentation
Version: Severity: None
Keywords: Cc:


from the FileGetVersion help:

FileGetVersion ( "filename" [, "stringname"] )

[this is apparent in versions,, and the online webpage]

please consider to mention the default value for the 2nd parameter "stringname". note that the default value is not "FileVersion". see this script:

ConsoleWrite('not specified: '&FileGetVersion(@AutoItExe)&@CR)
ConsoleWrite('FileVersion: '&FileGetVersion(@AutoItExe,'FileVersion')&@CR)

the results are:

not specified:
FileVersion: 3, 3, 10, 2

so you see, when the parameter is not specified, the result is different than when "FileVersion" is specified.
however, the "not specified" result is identical to the "File Version" as seen by the Properties dialog, which in turn is NOT identical to the result when "FileVersion" string is specified.

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by Melba23

  • Milestone set to
  • Owner set to Melba23
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [10263] in version:

comment:2 Changed 10 years ago by Melba23

According to MSDN the FileVersion is stored as 2 x 64bit integers - the 4 parts are stored as follows: -> 0x00030003 0x000C0000

My testing shows that FileGetVersion behaves as follows:

  • When no "stringname" is defined, the function extracts these values and returns them with "." delimiters.
  • If a specific "stringname" is defined, then the relevant string is returned - those in the current AutoIt3.exe are as follows:
    BLOCK "StringFileInfo"
    VALUE "CompanyName", "AutoIt Team"
    VALUE "Comments", ""
    VALUE "FileDescription", "AutoIt v3 Script"
    VALUE "FileVersion", "3, 3, 12, 0"
    VALUE "InternalName", "AutoIt3.exe"
    VALUE "LegalCopyright", "©1999-2014 Jonathan Bennett & AutoIt Team"
    VALUE "OriginalFilename", "AutoIt3.exe"
    VALUE "ProductName", "AutoIt v3 Script"
    VALUE "ProductVersion", "3, 3, 12, 0"

This explains the differences you highlight between having no "stringname" and using "FileVersion". I have amended the Help file to reflect this.


Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Melba23.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.