China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 00:34
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to make a one-step到位 ADSL dial-up batch processing? View 3,964 Replies 14
Original Poster Posted 2006-10-06 21:03 ·  中国 江苏 无锡 电信
初级用户
Credits 44
Posts 16
Joined 2006-08-15 07:15
19-year member
UID 60550
Status Offline
Every time I set up the computer to create an ADSL dial-up connection, there are n steps of "Next". Is there a way to do it in one go without using third-party software?
Floor 2 Posted 2006-10-06 23:55 ·  中国 江苏 无锡 电信
初级用户
Credits 44
Posts 16
Joined 2006-08-15 07:15
19-year member
UID 60550
Status Offline
Floor 3 Posted 2006-10-08 05:38 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
%appdata%\Microsoft\Network\Connections\Pbk\rasphone.pbk

Just create a new connection casually and then observe this file

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 4 Posted 2006-10-08 07:31 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

Strange, why is there no "%appdata%\Microsoft\Network" directory in my system?

dir /a doesn't show it~

My system is WIN-XP SP2~
Floor 5 Posted 2006-10-08 07:48 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Search for *.pbk files under C:

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 6 Posted 2006-10-08 09:45 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

Oh, the result is out --

C:\>dir /s /b /a-d *.pbk
C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk
Originally, the value of my %appdata% environment variable is:

C:\>set a
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
No wonder it couldn't be found.
Thanks to est for the guidance.
echo :)>est
Hehe
Floor 7 Posted 2007-05-23 12:24 ·  中国 福建 福州 福清市 电信
初级用户
Credits 22
Posts 8
Joined 2007-05-22 18:23
19-year member
UID 88989
Gender Male
Status Offline
Can you post the complete batch processing?
Floor 8 Posted 2007-05-23 12:27 ·  中国 上海 电信
初级用户
★★
Credits 180
Posts 84
Joined 2006-09-07 00:33
19-year member
UID 61995
Status Offline
Floor 9 Posted 2007-05-23 16:33 ·  中国 湖南 株洲 电信
初级用户
★★
Credits 135
Posts 54
Joined 2006-09-10 03:07
19-year member
UID 62265
Status Offline
Learning
992912
Floor 10 Posted 2007-05-24 21:21 ·  中国 福建 福州 电信
初级用户
Credits 114
Posts 41
Joined 2006-10-13 01:39
19-year member
UID 65535
Status Offline
Here I want to ask whether the following two lines in rasphone.pbk represent the account and password entered during the creation of the dial-up. If so, is there a way to make a batch processing to add or change the account and password to rasphone.pbk (plaintext input, automatically encrypted by the system and stored in the rasphone.pbk file)

DialParamsUID=4162735
Guid=4119FE7646DE4B41BD52E8AB94EFEE67

Another question is, how to use batch processing to create a shortcut for the dial-up connection on the desktop?

Hope to give the code, thank you!

[ Last edited by emote on 2007-5-24 at 09:52 PM ]
Floor 11 Posted 2008-03-02 00:14 ·  中国 广东 东莞 电信
中级用户
★★
Credits 326
Posts 152
Joined 2007-05-04 06:16
19-year member
UID 87412
Gender Male
Status Offline
I also post one... It should be imitating VBS. Found online
Not allowed to upload.

[ Last edited by qq43142691 on 2008-3-2 at 01:49 AM ]
Floor 12 Posted 2008-03-30 22:14 ·  中国 浙江 嘉兴 平湖市 电信
初级用户
★★
Credits 157
Posts 67
Joined 2007-05-13 11:03
19-year member
UID 88378
Gender Male
Status Offline
I wrote something that can solve the problem of ADSL being automatically created after restoring the C drive system, with detection of whether it's created.

@echo off
set VPN_LAN=0
set adslpath="C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk"
if exist %adslpath% findstr /c:"ADSL" %adslpath% ||set VPN_LAN=1

@echo %VPN_LAN%

echo set WshShell = CreateObject("WScript.Shell") >VPN_phone.VBS

if %VPN_LAN%==0 goto VPN_ADD
echo WshShell.Run "Rasphone -a" >>VPN_phone.VBS
echo WScript.Sleep 500 >>VPN_phone.VBS
echo WshShell.SendKeys "%+R" >>VPN_phone.VBS
echo WshShell.SendKeys "%+N" >>VPN_phone.VBS
echo WScript.Sleep 100 >>VPN_phone.VBS
echo WshShell.SendKeys "{BACKSPACE 10}" >>VPN_phone.VBS
echo WshShell.SendKeys "ADSL" >>VPN_phone.VBS
echo WScript.Sleep 500 >>VPN_phone.VBS
echo WshShell.SendKeys "{ENTER}" >>VPN_phone.VBS
echo WScript.Sleep 500 >>VPN_phone.VBS

:VPN_ADD
echo WshShell.Run "Rasphone -d ADSL" >>VPN_phone.VBS
echo WScript.Sleep 500 >>VPN_phone.VBS
echo WshShell.AppActivate "连接 ADSL" >>VPN_phone.VBS
echo WshShell.SendKeys "{TAB}" >>VPN_phone.VBS
echo WshShell.SendKeys "{TAB}" >>VPN_phone.VBS
echo WshShell.SendKeys "{TAB}" >>VPN_phone.VBS
echo WshShell.SendKeys "%+u" >>VPN_phone.VBS
echo WScript.Sleep 100 >>VPN_phone.VBS
echo WshShell.SendKeys "{BACKSPACE 10}" >>VPN_phone.VBS
echo WScript.Sleep 100 >>VPN_phone.VBS
echo WshShell.SendKeys "jxphayujh" >>VPN_phone.VBS
echo WScript.Sleep 100 >>VPN_phone.VBS
echo WshShell.SendKeys "{TAB}" >>VPN_phone.VBS
echo WScript.Sleep 500 >>VPN_phone.VBS
echo WshShell.SendKeys "{BACKSPACE 10}" >>VPN_phone.VBS
echo WScript.Sleep 500 >>VPN_phone.VBS
echo WshShell.SendKeys "密码" >>VPN_phone.VBS
echo WshShell.SendKeys "{TAB}" >>VPN_phone.VBS
echo WScript.Sleep 100 >>VPN_phone.VBS
echo WshShell.SendKeys "%+c" >>VPN_phone.VBS

start VPN_phone.VBS
Floor 13 Posted 2008-09-25 21:09 ·  中国 广东 梅州 电信
新手上路
Credits 6
Posts 3
Joined 2008-09-14 02:16
17-year member
UID 125603
Gender Male
Status Offline
I want to create a BAT for "Virtual Private Network Connection"
What should be changed in combination with the above statement?
Tried N times and it didn't work!!!
Hope the expert gives pointers
Floor 14 Posted 2008-09-26 03:26 ·  中国 广东 梅州 电信
新手上路
Credits 6
Posts 3
Joined 2008-09-14 02:16
17-year member
UID 125603
Gender Male
Status Offline
Floor 15 Posted 2008-11-22 23:26 ·  中国 福建 福州 中移铁通
新手上路
Credits 4
Posts 4
Joined 2008-11-22 19:04
17-year member
UID 131779
Gender Male
Status Offline
If you want to create a dial-up connection for a modem (MODEM), like the 16300 - type dial-up connection, how to do it?
Forum Jump: