Solved

need to alter a cisco vpn client script to answer "OK" to a popup error message

Posted on 2009-07-16
1
297 Views
Last Modified: 2012-05-07
I use scripts to automatically start and stop cisco vpn client sessions. They both work fine except that the stop script never closes the client. It WILL disconnect the session like its supposed to but the client it still running and there is a popup on the screen that tells the date and time of the disconnection. You have to click "OK" to get rid of it before the application closes. My problem is, if you DON'T click "OK" to this message then my start script the next day will fail with error "Secure VPN Connection terminated locally by Client. Reason 413: User authentication failed." Is there a piece of code that will allow me to have the script answer the "OK" to the disconnection message? Doing this would resolve my issue.
0
Comment
Question by:neilmccabe
1 Comment
 
LVL 14

Accepted Solution

by:
robincm earned 500 total points
ID: 24874453
Using VBScript you can do:
oShell.SendKeys "{ENTER}"

Better still, if the window has a title bar with text in it you can use something like:
Do While oShell.AppActivate("Title Bar Text")=False
   WScript.Sleep 500
Loop
oShell.SendKeys "{enter}"

If you don't like VBScript (why???) then use something like AutoIt:
http://www.autoitscript.com/autoit3/
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
I've written this article to illustrate how we can implement a Dynamic Multipoint VPN (DMVPN) with both hub and spokes having a dynamically assigned non-broadcast multiple-access (NBMA) network IP (public IP). Here is the basic setup of DMVPN Pha…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now