Modify

Opened 17 years ago

Closed 17 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 by J-Paul Mesnage, 17 years ago

Resolution: No Bug
Status: newclosed

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).

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.