FileGetVersion (“filename" [, "stringname"])
function is used to get the different property strings of a file. The
“stringname” to get file version is “FileVersion”.
In case of failure, the function returns "" (if
string field not filled etc.) and sets @error flag to 1.
Example:
#include <MsgBoxConstants.au3>
;Assign the string name to retrive to a variable
$sStringName = "FileVersion"
;Retrieve the File Version property of windows default calculator application.
Local $sStringValue = FileGetVersion("calc.exe", $sStringName)
If Not @error Then
;Display the property value.
MsgBox($MB_SYSTEMMODAL, "", $sStringValue)
Else
;If error, display an error message.
MsgBox($MB_ICONERROR, "", "Error when getting " & '"' & $sStringName & '"')
EndIf
;Assign the string name to retrive to a variable
$sStringName = "FileVersion"
;Retrieve the File Version property of windows default calculator application.
Local $sStringValue = FileGetVersion("calc.exe", $sStringName)
If Not @error Then
;Display the property value.
MsgBox($MB_SYSTEMMODAL, "", $sStringValue)
Else
;If error, display an error message.
MsgBox($MB_ICONERROR, "", "Error when getting " & '"' & $sStringName & '"')
EndIf
- AutoIt - Get the Version of a file from file properties
- 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 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