sdynk02 Posted May 25, 2015 Author Share Posted May 25, 2015 A simpler method can be found here:Func UpdateCheck($UpdatedVersionPath) FileDelete(@ScriptDir & "\OLD.exe") $CurrentVersion = FileGetVersion(@ScriptFullPath) $LastVersion = FileGetVersion($UpdatedVersionPath & @ScriptName) If $CurrentVersion < $LastVersion Then TrayTip("Updater", "Updating. . .", "", 2) FileCopy($UpdatedVersionPath & @ScriptName, @ScriptDir & "\NEW.exe") FileMove(@ScriptFullPath, @ScriptDir & "\OLD.exe") FileMove(@ScriptDir & "\NEW.exe", @ScriptFullPath) Run(@ScriptName) Exit EndIf EndFunc ;==>UpdateCheck Did you mean this code ? If this code, i got some questions about them. 1/ How could FileDelete work when it's running ? 2/ Why didn't he use _Versioncompare ? Link to comment Share on other sites More sharing options...
sdynk02 Posted May 25, 2015 Author Share Posted May 25, 2015 and one more question. Can you give me a func to set a version to the GUI except AutoIT3Wrapper ??? Link to comment Share on other sites More sharing options...
water Posted May 25, 2015 Share Posted May 25, 2015 1) The function deletes the OLD.EXE of the last run2) Maybe _VersionCompare was not available at that time or he didn't know about it. But I think the function could be changed to use _VersionCompare. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 @sdynk02 All in 1 thread? Please open a new thread for your needs EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
water Posted May 25, 2015 Share Posted May 25, 2015 @sdynk02 All in 1 thread? Please open a new thread for your needs Why? I think it is related to the subject of this thread and hence a valid question. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted May 25, 2015 Share Posted May 25, 2015 and one more question. Can you give me a func to set a version to the GUI except AutoIT3Wrapper ??? You are talking about the version of the exe which can be seen in the properties tab in windows explorer?I do not know of another way to set the version. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sdynk02 Posted May 25, 2015 Author Share Posted May 25, 2015 That's right, but it seem to be impossible, so do u have any ideas to get close script before Filecopy runs Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 @sdynk02 I already posted this before:RunWait(@ComSpec & " /c " & 'taskkill /im "MVT-Tool.exe /f"') EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
water Posted May 25, 2015 Share Posted May 25, 2015 But how do you want to execute any further statements when you have killed yourself? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 Sorry, I forgot the point. @water Thanks EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion 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