ZDS Posted May 25, 2012 Share Posted May 25, 2012 (edited) Bonjour tout le monde / Hi to everyone ! First of all, I apologize in advance, I'm a french user and my last English lesson was near to 5 years ago ^^ I'm trying to read the extended property of a compiled script, NOT THE CLASSIC ONES (not the version for example, I know how to use FileGetVersion). When the following code is compiled to "foobar.exe", I'd like to catch (in another script) the value in a property named "foo", aka "bar" in the example below.#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Field=foo|bar #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** MsgBox(0,"","foobar !")Here is a little screenshot from the Properties Window (sorry french version of Windows) : Thanks for all the help you could give to me ! A bientôt / See you ! ZDS PS: I forgot, I'm looking for a function for an executable, this is the kind of function for a not-compiled script :Func FileGetAdvancedPropertyForSRC($file, $property) Local $value = "", $start = "#AutoIt3Wrapper_Res_Field="&$property&"|" Local $flux = FileOpen($file, 0) If Not @error And $file <> -1 Then For $i = 1 To 25 Local $line = FileReadLine($flux, $i) If @error Then ExitLoop If StringLeft($line,StringLen($start)) = $start Then $value = StringTrimLeft($line,StringLen($start)) ExitLoop EndIf Next EndIf FileClose($file) Return $value EndFunc Edited May 25, 2012 by ZDS Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now