3

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
nils
  • 53
  • 1
  • 3
  • 7

3 Answers3

1

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
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
0

You can use a vpnclient.ini file in the same folder as noted here. Basically, the sample is like this:

[Main]
AutoInitiationEnable=1
AutoInitiationRetryInterval=3
AutoInitiationList=ChicagoWLAN,DenverWLAN,LaramieWLAN
[ChicagoWLAN]
Network=110.110.110.0
Mask=255.255.255.0
ConnectionEntry=Chicago (points to a connection profile named chicago.pcf)
[DenverWLAN]
Network=220.220.220.0
Mask=255.255.255.0
ConnectionEntry=Denver (points to a connection profile named denver.pcf)
[LaramieWLAN]
Network=221.221.221.0
Mask=255.255.255.0
ConnectionEntry=Laramie (points to a connection profile named laramie.pcf)

The AutoInitiationEnable=1 is the important bit and may bypass that prompt. I can't test this to be sure, though.

Nathan C
  • 15,059
  • 4
  • 43
  • 62
0

mchen98006: modify the file

C:\Program Files (x86)\Cisco Systems\VPN Client\Profiles\mchen.pcf

Replace:

SendCertChain=1

with

SendCertChain=0
Jakuje
  • 9,715
  • 2
  • 42
  • 45