Jump to content

Script doesn't wait until end to send key.


Recommended Posts

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.

Link to comment
Share on other sites

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 by MadBoy

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...