中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-12 05:06
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 用脚本自动拨VPN 查看 1,026 回复 4
楼 主 用脚本自动拨VPN 发表于 2009-07-31 00:24 ·  新加坡 惠普HP
中级用户
★★
积分 400
发帖 211
注册 2007-09-30 18:02
18年会员
UID 98650
性别 男
状态 离线
用脚本自动拨公司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 发表于 2009-07-31 20:27 ·  中国 北京 朝阳区 联通
银牌会员
★★★★
[b]看你妹啊[/b]
积分 1,488
发帖 1,357
注册 2006-05-20 12:00
20年会员
UID 55770
状态 离线
。。。

就几行没技术含量代码,谁都会写。就别打什么原创的标签了。

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
3 发表于 2009-08-05 12:33 ·  中国 广西 桂林 电信
新手上路
积分 12
发帖 21
注册 2008-11-20 21:05
17年会员
UID 131595
性别 男
状态 离线
。。。
我对此不发表评论
4 发表于 2009-08-06 04:19 ·  中国 广东 江门 恩平市 电信
初级用户
积分 74
发帖 31
注册 2006-08-26 03:38
19年会员
UID 61291
状态 离线
@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 发表于 2009-08-06 04:54 ·  中国 北京 中电华通通信有限公司
中级用户
★★
积分 216
发帖 129
注册 2007-02-14 07:26
19年会员
UID 79469
性别 男
状态 离线
4楼的代码看不懂 rasdia?
论坛跳转: