sdynk02 Posted May 25, 2015 Share Posted May 25, 2015 I got a problem like i wrote on Title. Actually, im coding a Update Version script. Everything is fine until i compile it from .au3 to .exe. FileCopy was not working. Here is my Code : Func _Update()Local $2 = FileRead("Z:\MVT\Version.txt")If _VersionCompare($ThisVersion, $2 ) = -1 ThenIf MsgBox(32 + 4 + 262144, "Update", "Do you want to update?") = 6 ThenSleep(100)FileCopy("Z:\MVT\MVT-Tool.exe", @DesktopDir & "\", $FC_OVERWRITE)Sleep(500)MsgBox(0,"Update","Successful")Sleep(50)WinClose("MVT-Tool")Sleep(50)EndIfElseMsgBox(64 + 262144, "Update", "No need to update")Sleep(10)EndIfEndFunc ;==> _UpdateI don't know why. When it's on .au3 file, filecopy works correctly but when it's converted to .exe, function Filecopy didn't work.Plz help me. Tks a lot Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 Please disable your AV & try it, TD 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 Maybe @DesktopDir & "\Z:\MVT\MVT-Tool.exe" is already opened or running?What is the path and name of the compiled exe you are running? 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 Please disable your AV & try it, TD I'm sorry but what's AV ? Link to comment Share on other sites More sharing options...
sdynk02 Posted May 25, 2015 Author Share Posted May 25, 2015 (edited) Maybe @DesktopDir & "\Z:\MVT\MVT-Tool.exe" is already opened or running?What is the path and name of the compiled exe you are running?Just Complied exe to desktop and i tested those cases, @DesktopDir & "\Z:\MVT\MVT-Tool.exe" is already opened and running. It didn't work at all Edited May 25, 2015 by sdynk02 Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 @sdynk02 Antivirus 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 AV stands for Anti Virus. 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 Just Complied exe to desktop. And the name of the compiled program is? 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 @water : same name. MVT-Tool.exe Link to comment Share on other sites More sharing options...
sdynk02 Posted May 25, 2015 Author Share Posted May 25, 2015 @TheDcoder : I don't think so. I tested on 3 computers and what i got is..... Still didn't work Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 @sdynk02 Did you try with your AV disabled on your computer ? 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...
sdynk02 Posted May 25, 2015 Author Share Posted May 25, 2015 If possible, you guys can access to my computer through Teamview to see how it works Link to comment Share on other sites More sharing options...
water Posted May 25, 2015 Share Posted May 25, 2015 You can't replace a program (exe) while it is running. 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 You can't replace a program (exe) while it is running.@water : so do you have any ideas to make it change ???? Link to comment Share on other sites More sharing options...
water Posted May 25, 2015 Share Posted May 25, 2015 Yes, please have a look at _SelfUpdate 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 @water : so do you have any ideas to make it change ???? 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 that's brute force ... 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 It's so complicated. I'm gonna read it later but now i think i will convert it to .a3x then. But if a computer with no AutoITv3 installed, Can it run file .a3x ? Link to comment Share on other sites More sharing options...
TheDcoder Posted May 25, 2015 Share Posted May 25, 2015 @sdynk02 Hey, just one questionQ: Does your file run when its not compiled?And answer for your question: a3x file requires autoit3.exe to get executed 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 A simpler method can be found here: 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...
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