Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Windows Expect?

by THuG (Beadle)
on Aug 18, 2005 at 15:01 UTC ( #484807=perlquestion: print w/ replies, xml ) Need Help??
THuG has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to automate a Cisco VPN client. It has a command line interface, but it appears to be interactive only. You still have to type in your Id. and password at prompts. You can't pass these values when you call the connect command, despite the fact that these appear to be valid arguments.

Is there a Windows equivalent of the Expect module or some other strategy I could use?

Comment on Windows Expect?
Re: Windows Expect?
by JSchmitz (Canon) on Aug 18, 2005 at 18:24 UTC
    If you use the Cygwin environment which brings its own Perl, and have the latest IO::Tty (v0.05) installed, it should work
    cheers -

    Jeffery
Re: Windows Expect?
by decnartne (Beadle) on Aug 19, 2005 at 14:15 UTC
    To address the initial problem with perhaps a silly question - does the user have write access to the vpnprofilename.pcf file? I was successful using the cli w/ the 4.6.03.0021 client on XP SP2 and noticed from the Cisco docs and in watching the timestamp that this file is mod'd at execution. Also, if the user/password combo are wrong, the dialog box pops up, however, I'll assume that this is not what's tripping up the client.

    Anyway, if you are unsuccessful, for whatever reason, on the cygwin/io::tty route, perhaps something like AutoIt3 would help out (it allows scripting of mouse/keypress events). YMMV, of course, depending on organization constraints.

    decnartne ~ entranced

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://484807]
Approved by Nevtlathiel
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-08-31 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls