mikeyr Posted April 3, 2009 Share Posted April 3, 2009 (edited) I am trying to get the version of ...Res_FileVersion to output to my screen OR my EXEs version but when I use FileGetVersion I always get AutoIT's version, I tried a variety of "stringname" and not found it yet This is cut down but you get the idea, what I want is in the lower left corner to display is 0.91.0.4 and not 3.3.10 CODE; *** Start added by AutoIt3Wrapper *** #include <EditConstants.au3> #include <GUIConstantsEx.au3> ; *** End added by AutoIt3Wrapper *** #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Fileversion=0.91.0.4 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiConstants.au3> #include <GuiEdit.au3> Opt("TrayIconHide", 1) GUICreate("Map Drive", 280, 150) GuiCtrlCreateLabel(filegetversion(@AutoItExe,"Fileversion"), 1, 137, 30, 15) ;try and keep this up to date so you can keep track of which version is out in the wild. GuiCtrlCreateLabel("User name:", 20, 15, 60, 20) $username_cf = GUICtrlCreateInput("", 90, 10, 180, 20) GuiCtrlCreateLabel("Password:", 20, 40, 60, 20) $password_cf = GUICtrlCreateInput("", 90, 40, 180, 20, $ES_PASSWORD) $connect_cf = GUICtrlCreateButton("Connect!", 60, 80, 80, 25) $cancel_cf = GUICtrlCreateButton("Cancel", 160, 80, 80, 25) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE or $msg = $cancel_cf Then ExitLoop Select Case $msg = $connect_cf Case $msg = $GUI_EVENT_CLOSE ;not needed anymore due to if clause above ? ExitLoop EndSelect WEnd Edited April 7, 2009 by mikeyr Link to comment Share on other sites More sharing options...
Exit Posted April 4, 2009 Share Posted April 4, 2009 Just compile it and see the perfect result. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
mikeyr Posted April 6, 2009 Author Share Posted April 6, 2009 (edited) Isn't there a way to get this ? I am not sure what Forumer is trying to say because it is not giving the result I want (or I would not have asked for help ) My exe has the correct version and that is what I need to display, I often forget to update the version when i release the software so I want to get it and display it. Maybe I was not clear the first time, what I want to display is VERSION 0.91.0.4 and NOT 3.3.1 from autoit version, the EXE has the correct version when I do a "properties" on it. Edited April 6, 2009 by mikeyr Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2009 Developers Share Posted April 6, 2009 Have you installed the full version of SciTE4AutoIt3? That is required as that run AutoIt3Wrapper which does the Resource Update. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikeyr Posted April 6, 2009 Author Share Posted April 6, 2009 (edited) Have you installed the full version of SciTE4AutoIt3? I thought I had, pretty sure I did. In windows if I right-mouse click on my EXE it does give me version 0.9,etc... doesn't that mean that I have the full version and it did its thing ? I just reloaded the full version and got the same results... ********** EDIT SOLVED... when running from the Editor it gives you the AutoIT version, if you run FROM THE EXE it works, makes sense but I was running from the editor ************ Edited April 6, 2009 by mikeyr Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2009 Developers Share Posted April 6, 2009 (edited) I thought I had, pretty sure I did. In windows if I right-mouse click on my EXE it does give me version 0.9,etc... doesn't that mean that I have the full version and it did its thing ? How would I check ? I was thinking that since Windows showed me the correct version that the EXE was correct. I have the full SciTEAutoIT3 install file here so I must have done it since the versions are changing in the EXE...will try a re-install right now, I really need this solved I just copied your code into a script. compiled it and ran the output EXE. This showed me the Version as defined in the Script.You say that Explorer shows the correct version? What OS are you running? Edited April 6, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikeyr Posted April 6, 2009 Author Share Posted April 6, 2009 I just copied your code into a script. compiled it and ran the output EXE. This showed me the Version as defined in the Script. Yes, we typed in the answer at the same time, I have to run FROM the EXE to get the proper results, duh, it makes sense now that I think about it. I was running from the editor. Now how do I mark this thread solved Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 7, 2009 Share Posted April 7, 2009 (edited) If @Compiled Then $FileVersion = "Ver: " & filegetversion(@AutoItExe,"Fileversion") Else $FileVersion = "Au3 Ver: " & filegetversion(@AutoItExe,"Fileversion") EndIf Opt("TrayIconHide", 1) GUICreate("Map Drive", 280, 150) GuiCtrlCreateLabel($FileVersion, 1, 137, 100, 15) ;try and keep this up to date so you can keep track of which version is out in the wild.This will do the trick , and to mark solved , i just go to first post, edit it and add a tag [solved] to the title :-)Though i dont use edit box, i have scanning functionality specific to few viruses, the version i would use is attached herewith. :-)> Gives user the information which drives were scanned> if the media is not mounted properly, or the drive is unavailable then user will be notified (typically media not properly inserted into card reader would make the user feel his card is free from autorun viruses- this is a common case i see now adays autorun viruses get distributed in ALL REMOVABLE MEDIA not just flash drives.. ( i know thats why u came up with this:D ) my bad ....<sorry>_SCanforAutorun_inf.au3 Edited April 10, 2009 by rajeshontheweb Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
mikeyr Posted April 7, 2009 Author Share Posted April 7, 2009 I like your way of using the IF loop to verify I am doing it right, I tend to run a lot from the editor while testing, This will help me. Thanks... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now