Modify

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: 3.3.13.0 Component: Documentation
Version: Severity: None
Keywords: Cc:

Description

from the FileGetVersion help:

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

[this is apparent in versions 3.3.8.1, 3.3.10.2, 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: 3.3.10.2
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 3.3.13.0
  • Owner set to Melba23
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [10263] in version: 3.3.13.0

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:

3.3.12.0 -> 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", "http://www.autoitscript.com/autoit3/"
    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.

M23

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

Action
as closed The owner will remain Melba23.
Author


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

 
Note: See TracTickets for help on using tickets.