LATEST UPDATES
ShareHolder Finder v0.9.3 is now released!!! Check Product Page for more details.
✉ info@automationdevelopers.com

ITS ALL ABOUT AUTOMATION

Friday, 25 March 2016

AutoIt - Get the Internal Name property of a file from file properties


Author Post Date Friday, 25 March 2016
FileGetVersion (“filename" [, "stringname"]) function is used to get the different property strings of a file. The “stringname” to get Internal Name is “InternalName”.
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 = "InternalName"

;Retrieve the Internal Name 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

Related Posts




Interesting? Share and Let Others Know.

Post a Comment