Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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?

Replies are listed 'Best First'.
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 -

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 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://484807]
Approved by Nevtlathiel
Front-paged by planetscape
[stonecolddevin]: erix seems pretty good, i listened to "So Many Roads" and it was nice. Not everyone's cup of tea but this guy can absolutely shred, he and the guy from Mastodon are definitely up there: https://www. v=VzhMkSN9dQc
[erix]: ha, good stuff - loud and fast...
[stonecolddevin]: here's some Mastodon for when you have 13 minutes to have your mind blown: https://www. v=4pvfQtUhtNE
[karlgoethebier]: goes to Brownsville one more time..
erix squirrels away the linkies

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-06-22 21:50 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (531 votes). Check out past polls.