Openvpn – Cisco VPN client – how to automate vpn process

cisco-vpnopenvpnvbscriptvpn

I use Cisco vpn client to connect some customer

Vpnclient.exe required answer about the question “Do you wish to continue” (yes / no )

Is it possible to run the vpnclient.exe without question ? (silent mode )
( I not want interactive mode )

My target is to automate the vpnclient.exe without interactive question

the second way is to use VB script that can answer the question with “yes” string
if my first question can’t be solved

then please advice how to automate this process with VB script ( I need example )

example from my CMD window

 C:\Program Files\Cisco \VPN  >vpnclient.exe connect  "customor”
 Cisco Systems VPN Client Version 5.0.01.0600
 Copyright (C) 1998-2007 Cisco Systems, Inc. All Rights Reserved.
 Client Type(s): Windows, WinNT
 Running on: 5.1.2600 Service Pack 2
 Config file directory: C:\Program Files\Cisco \VPN \

 Initializing the VPN connection.
 Contacting the gateway at 33.211.101.20
 Negotiating security policies.
 Securing communication channel.

  ============================================================================
  THIS IS THE HIGHLY RESTRICTED AREA!
  PROPERTY OF UNITEL LTD COMPANY
  All access attempts are logging with immediate alerting of security staff
   ============================================================================

   Do you wish to continue? (y/n):

USAGE:

 Usage:
 vpnclient connect <profile> [user <username>] [eraseuserpwd | pwd <password>]
                         [nocertpwd] [cliauth] [stdin] [sd]
 vpnclient disconnect
 vpnclient stat [reset] [traffic] [tunnel] [route] [firewall] [repeat]
 vpnclient notify
 vpnclient verify [autoinitconfig]
 vpnclient suspendfw
 vpnclient resumefw

.

ini file

 [main]
 ClientLanguage=
 [GUI]
 WindowWidth=600
 WindowHeight=330
 WindowX=189
 WindowY=43
 VisibleTab=0
 ConnectionAttribute=0
 AdvancedView=1
 LogWindowWidth=0
 LogWindowHeight=0
 LogWindowX=0
 LogWindowY=0
 DefaultConnectionEntry=jhdgfgs

Best Answer

Finally found the answer. it was the simplest one.I had to search many places to automate the connection process !!!

try the following command:

echo y | vpnclient.exe connect (Type Profile Name here) user (Type User Name here) pwd (Type Pwd here) nocertpwd stdin

if this is not working try the entire path for the exe. For example:

echo y | "C:\Program Files\Cisco Systems\VPN Client\vpnclient.exe" connect abcd user hello pwd wassup nocertpwd stdin
Related Topic