pjw73nh Posted April 30, 2007 Posted April 30, 2007 Greetings, This is a portion of a script that installs a client. Unfortunately, the windows all have the same title. Run(@WorkingDir & "\vpnclient_setup.exe") WinWaitActive("Cisco Systems VPN Client 5.0.00.0340 Setup") Send("!n") WinWaitActive("Cisco Systems VPN Client 5.0.00.0340 Setup") Send("!a") Send("!n") WinWaitActive("Cisco Systems VPN Client 5.0.00.0340 Setup") Send("!n") WinWaitActive("Cisco Systems VPN Client 5.0.00.0340 Setup") Send("!n") WinWaitActive("Cisco Systems VPN Client 5.0.00.0340 Setup") Send("!f") The script runs fine until it gets to the last "WInWaitActive". The way it is supposed to run is: The first four "WinWaitActive"s Are all answers to windows that have simple questions. IE "Next, All, Next, Next, Next. On this fourth one, the program runs the actual install which takes anywhere from 30 second to 5 minutes depending on network load. My problem is that the way it is written, it sends the last "F"inish immediately after processing the 4th "WinWait Active". It doesn't wait for the actual install program to complete and display the last window where the "F"inish is an option. I suppose I could put a long delay in there, but that would unnecessarily delay a fast PC from installing. I am sure there is another command I could use that would solve my problem. I just can't find it. Thanks for any help. P.
Zedna Posted April 30, 2007 Posted April 30, 2007 After first WinWaitActive() your window is still active so other WinWaitActive() are useless.You must use some other Autoit commands to see if some action is done.See ControlCommand, ControlGetText for example. Resources UDF ResourcesEx UDF AutoIt Forum Search
Shevilie Posted April 30, 2007 Posted April 30, 2007 Does the windows have any text... WinWaitActive("title", "text") Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
MadBoy Posted April 30, 2007 Posted April 30, 2007 (edited) How about trying to use it in nicer way, to customize it to your company needs, settings and with everything. Here's the link. This way you can just use RunWait(.exe) and it should do all nessecary things automagically without need to do automation of windows.Cheers,Ps. 90% of standard applications have some silent switches, configuration files so if i were you i would go that way with any instalations you have to do. Use the Windows, mouse automatization only in cases where there's no such option (as in in some very non-standard applications). MadBoy Edited April 30, 2007 by MadBoy My little company: Evotec (PL version: Evotec)
Zedna Posted April 30, 2007 Posted April 30, 2007 How about trying to use it in nicer way, to customize it to your company needs, settings and with everything. Here's the link. This way you can just use RunWait(.exe) and it should do all nessecary things automagically without need to do automation of windows. Cheers, Ps. 90% of standard applications have some silent switches, configuration files so if i were you i would go that way with any instalations you have to do. Use the Windows, mouse automatization only in cases where there's no such option (as in in some very non-standard applications). MadBoy Or commandline parametres for silent mode: Silent Installation Using MSI To install the VPN Client without dialogs and messages (user interface) displaying on the screen, you can use either of the two following commands on the command line. msiexec.exe /q [n|b|r|f] /i vpnclient_en.msi or vpnclient_en.exe /q [n|b|r|f] Then Only RunWait() will be neccessary Resources UDF ResourcesEx UDF AutoIt Forum Search
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