dwaltosz Posted January 24, 2015 Share Posted January 24, 2015 so I am trying to get a file to copy from a net share to the desktop and over write the existing file. the file is .ini file that I need to update after an installation I have about 500+computers that need this I have the install automated butat the end need that file updated any suggestions? at the bottom is my attempt to get it to work but when I run it the last line does to GO but if I comment out all but that last line it will run just fine not sure if I am missing anything???? Please Help expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <Process.au3> #RequireAdmin run("\\REDMAN03\Installs\Dentrix\DentrixIntegrator-CD303b5\Engl-US\IntegratorClient\IntegratorClientUS.exe") sleep(5000) Local $hWnd = WinWait("DEXIS Integrator Client - InstallShield Wizard", "") WinActivate($hWnd) ControlFocus($hWnd, "", "Button1") ControlClick($hWnd, "", "Button1") WinWait("DEXIS Integrator Client - InstallShield Wizard", "") WinActivate("DEXIS Integrator Client - InstallShield Wizard", "") ControlClick("DEXIS Integrator Client - InstallShield Wizard", "", 1000) ControlClick("DEXIS Integrator Client - InstallShield Wizard", "", 1) WinWait("DEXIS Integrator Client - InstallShield Wizard", "") WinActivate("DEXIS Integrator Client - InstallShield Wizard", "") ControlClick("DEXIS Integrator Client - InstallShield Wizard", "", 1) WinWait("DEXIS Integrator Client - InstallShield Wizard", "") WinActivate("DEXIS Integrator Client - InstallShield Wizard", "") ControlClick("DEXIS Integrator Client - InstallShield Wizard", "", 1) WinWait("DEXIS Integrator Client - InstallShield Wizard", "") WinActivate("DEXIS Integrator Client - InstallShield Wizard", "") ControlClick("DEXIS Integrator Client - InstallShield Wizard", "", 1) Sleep(9000) WinWait("DEXIS Integrator Client - InstallShield Wizard", "") WinActivate("DEXIS Integrator Client - InstallShield Wizard", "") ControlClick("DEXIS Integrator Client - InstallShield Wizard", "", "Button4") Sleep(5000) run("msiexec /i \\redman03\installs\TSScan\Client\TSScanMSI.msi") WinWaitActive("Open File - Security Warning", "") ControlClick("Open File - Security Warning", "", 4426) Run(@ComSpec & ' /c \\REDMAN03\Installs\Dentrix\DentrixIntegrator-CD303b5\Engl-US\IntegratorClient\INI.Bat', "", @SW_HIDE) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 24, 2015 Moderators Share Posted January 24, 2015 Why not use InstallShield's silent install and others switches which would bypass all the clicks? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Bert Posted January 24, 2015 Share Posted January 24, 2015 (edited) Why not use InstallShield's silent install and others switches which would bypass all the clicks? I Agree with SmOke_N. That approach is MUCH easier and no worries about if you clicked a button right or not. Edited January 24, 2015 by Bert The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
dwaltosz Posted January 26, 2015 Author Share Posted January 26, 2015 I had one of the software engineers at my work help me with the installshield's silent install before trying this and we ran into some snags and could not get it to work and we were spending more time then it was worth so I moved to using autoit I got the install working just fine just need to update a .ini file after the install that is all I am running into a problem with. Link to comment Share on other sites More sharing options...
TheSaint Posted January 26, 2015 Share Posted January 26, 2015 I don't know whether English is your native language, but it really helps if questions are worded properly (that care is taken). I'm presuming that does to GO actually means "doesn't go"? It may help us to know the content of your INI.bat file. Do you know for sure that it doesn't run? Or is it just not giving the results you expect? I think it is fairly safe to say, that if it runs on its own with the prior lines commented out, then it is probably running. That's taking for granted, that it exists already at the run location. It could well be just a timing issue, which might be apparent if we knew the commands you use in the INI.bat file. I'm presuming, that certain things need to have finished, before the INI.bat file runs? Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Solution dwaltosz Posted January 26, 2015 Author Solution Share Posted January 26, 2015 sorry for the bad typing I get typing fast and miss a few letters or words in there but any who I figured it out... at the end of my code I had a winwaitactive and that was holding the whole thing up it was waiting tell the window was active but it had already done what it needed to do. after I changed it to winactivate it ran without a hitch. thanks all for your help and imput. 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