Modify

Opened 15 years ago

Closed 15 years ago

#933 closed Bug (No Bug)

FileGetVersion() generates error when File Version attribute values contain leading 0

Reported by: dave.jong@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

Using the FileGetVersion optional parameter to look at the "FileVersion" attribute, the function generates an error if the file version value contains a leading 0.

; Errors in reading File Versions with leading 0's
$File = @WindowsDir & "\system32\quartz.dll" ; Example File Version with leading 0

$LocalFileVersion = FileGetVersion($File,"FileVersion") ; FileVersion attribute contains value: 6.05.2600.5731 (note leading 0 in minor version number)
Msgbox(64,"DEBUG", "File Version After First Instance: " & $LocalFileVersion & " @ERROR = " & @error)
If $LocalFileVersion="" Then

$LocalFileVersion = FileGetVersion($File)
Msgbox(64,"DEBUG", "File Version After Second Instance: " & $LocalFileVersion & " @ERROR = " & @error)

EndIf

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

in fact when you use the FilegetVersion($file, "FileVersion") you don't access to the same information.
Under Vista you get the version with more info as :

6.6.6000.16386 (vista_rtm.061101-2205)

We will not change this behavior. That's the reason why you received the extra 0. If you want not 0 just use FilegetVersion($file).

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 ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.