我使用思科VPN客户端连接一些客户
Vpnclient.exe需要回答有关“您是否希望继续”的问题(是/否)
有没有可能运行vpnclient.exe没有问题? (静音模式)(我不想交互模式)
我的目标是自动化vpnclient.exe没有交互问题
第二种方法是使用VB脚本,如果我的第一个问题不能解决,可以用“是”string来回答问题
那么请咨询如何使用VB脚本自动执行此过程(我需要示例)
例如从我的CMD窗口
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: 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文件
[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
终于find了答案。 这是最简单的一个。我不得不search很多地方来自动连接过程!
尝试以下命令:
echo y | vpnclient.exe connect (Type Profile Name here) user (Type User Name here) pwd (Type Pwd here) nocertpwd stdin
如果这不工作尝试整个path的exe。 例如:
echo y | "C:\Program Files\Cisco Systems\VPN Client\vpnclient.exe" connect abcd user hello pwd wassup nocertpwd stdin
您可以在此处所述的同一文件夹中使用vpnclient.ini文件。 基本上,样本是这样的:
[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)
AutoInitiationEnable=1是重要的位,可能绕过该提示。 不过,我无法确定这一点。
mchen98006:修改文件
C:\Program Files (x86)\Cisco Systems\VPN Client\Profiles\mchen.pcf
更换:
SendCertChain=1
同
SendCertChain=0