中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-12 06:07
47,811 主题排行 / 349,897 发帖 / 今日 0 篇 / 48,256 会员排行
DOS批处理 & 脚本技术(批处理室) » 用脚本自动拨VPN
可打印版本  1,027 / 4
第1楼 uiopuiop 发表于 2009-07-31 00:24
中级用户 发帖 211 积分 400
用脚本自动拨VPN
用脚本自动拨公司VPN


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\WINDOWS\system32\rasphone.exe -d ""MS Remote Access Connection"""
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 2500
'enter password
WshShell.SendKeys "12345678"
WshShell.SendKeys "{ENTER}"

[ Last edited by uiopuiop on 2009-8-1 at 12:55 ]
第2楼 yishanju 发表于 2009-07-31 20:27
银牌会员 发帖 1,357 积分 1,488
。。。

就几行没技术含量代码,谁都会写。就别打什么原创的标签了。
第3楼 87373066 发表于 2009-08-05 12:33
新手上路 发帖 21 积分 12
。。。
我对此不发表评论
第4楼 hhh246 发表于 2009-08-06 04:19
初级用户 发帖 31 积分 74
@echo off
mode con cols=30 lines=6
color 0d
rasdial jtroute user pass /phonebook:%0
echo.
for /f "tokens=15 delims= " %%i in ('ipconfig^|find "IP Address. . . . . . . . . . . . :"') do echo PPTP本地IP: %%i
echo.
echo 按任意健结束连接
pause>nul
rasdial jtroute /DISCONNECT
exit

[jtroute]
Encoding=1
Type=2
AutoLogon=0
UseRasCredentials=1
DialParamsUID=41087751
Guid=FD4194777B95114495EE7CA1B6DB3B90
BaseProtocol=1
VpnStrategy=2
ExcludedProtocols=2
LcpExtensions=1
DataEncryption=8
SwCompression=1
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=1
DialPercent=75
DialSeconds=120
HangUpPercent=10
HangUpSeconds=120
OverridePref=15
RedialAttempts=99
RedialSeconds=1
IdleDisconnectSeconds=0
RedialOnLinkFailure=1
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
AuthenticateServer=0
ShareMsFilePrint=1
BindMsNetClient=1
SharedPhoneNumbers=0
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=VPN2-0
PreferredDevice=WAN ??? (L2TP)
PreferredBps=0
PreferredHwFlow=1
PreferredProtocol=1
PreferredCompression=1
PreferredSpeaker=1
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=0
PreviewPhoneNumber=0
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=608
TypicalAuth=2
IpPrioritizeRemote=1
IpHeaderCompression=0
IpAddress=0.0.0.0
IpDnsAddress=0.0.0.0
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=1
IpFrameSize=0
IpDnsFlags=0
IpNBTFlags=1
TcpWindowSize=0
UseFlags=0
IpSecFlags=0
IpDnsSuffix=

NETCOMPONENTS=
ms_server=1
ms_msclient=1
ms_psched=1

MEDIA=rastapi
Port=VPN3-0
Device=WAN 寰瀷绔彛 (L2TP)

DEVICE=vpn
PhoneNumber=192.168.1.1
AreaCode=
CountryCode=86
CountryID=86
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=1

-----------------------------
这个才是用脚本拔vpn
第5楼 xswdong 发表于 2009-08-06 04:54
中级用户 发帖 129 积分 216
4楼的代码看不懂 rasdia?
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023