Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2018-06-23 10:19 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.