We will have to get file property strings for various
purposes and the function FileGetVersion (“filename" [,
"stringname"]) is used for this. The optional “stringname” parameters
is used to specify the name of string field to be retrieved.
If “stringname” is not specified, it returns the version
information. The version number returns in the format of "#.#.#.#" and
if no version information (or other error), it returns "0.0.0.0"and sets
@error flag to 1.
Example:
#include <MsgBoxConstants.au3>
;Retrieve the version of the windows default calculator application.
Local $sVersion = FileGetVersion("calc.exe")
If Not @error Then
;Display the version.
MsgBox($MB_SYSTEMMODAL, "", $sVersion)
Else
;If error, display an error message.
MsgBox($MB_ICONERROR, "", "Error when getting version")
EndIf
;Retrieve the version of the windows default calculator application.
Local $sVersion = FileGetVersion("calc.exe")
If Not @error Then
;Display the version.
MsgBox($MB_SYSTEMMODAL, "", $sVersion)
Else
;If error, display an error message.
MsgBox($MB_ICONERROR, "", "Error when getting version")
EndIf
- AutoIt - Get the Comments property of a file from file properties
- AutoIt - Get the Company Name property of a file from file properties
- AutoIt - Get the File Description property of a file from file properties
- AutoIt - Get the File Version property of a file from file properties
- AutoIt - Get the Internal Name property of a file from file properties
- AutoIt - Get the Legal Copyright property of a file from file properties
- AutoIt - Get the Legal Trademarks property of a file from file properties
- AutoIt - Get the Original Filename property of a file from file properties
- AutoIt - Get the Product Name property of a file from file properties
- AutoIt - Get the Private Build property of a file from file properties
- AutoIt - Get the Special Build property of a file from file properties
- AutoIt - Get the Product Version property of a file from file properties
Interesting? Share and Let Others Know.
Post a comment