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-06-25 04:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to automatically open the broadband connection when booting up? (Solved) View 11,238 Replies 46
Original Poster Posted 2006-12-14 23:04 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
I am using a broadband connection via the telephone line WAN mini-port (PPPOE).
Every time I start up and go online, I have to double-click that broadband connection icon to get online.
It feels relatively cumbersome.
I looked for relevant batch scripts,
and only found ones that start EXE programs,
and didn't find one that can start this.
Please everyone help see if a batch script can solve this problem?







Solution:
After the help of many enthusiastic friends,
finally this problem was solved.
The effective code is as follows: (provided by friend redtek)

"rasdial 宽带连接 你的帐号 你的密码"

Only this was effective on my machine,
everyone is welcome to continue testing the codes provided by other friends.



[ Last edited by fastrun on 2006-12-14 at 01:13 PM ]
Floor 2 Posted 2006-12-14 23:06 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 3 Posted 2006-12-14 23:16 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
I know to add to the startup,
The question is what things should be added?
Little brother has just arrived,
Please give more advice!
Floor 4 Posted 2006-12-14 23:18 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
Create a shortcut for the broadband connection and place the shortcut in the startup group
Floor 5 Posted 2006-12-14 23:22 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
Still not quite understand
Sorry about that
Floor 6 Posted 2006-12-14 23:28 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
This is the path: C:\Documents and Settings\Administrator\「Start」Menu\Programs\Startup. The user name is determined according to the actual situation of your own computer.
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 7 Posted 2006-12-14 23:34 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
Thanks ccwan.
The method you tried just now works.
But it seems only the broadband connection can be opened,
Still need to click "OK" to connect.
Can we use batch processing or scripts to directly open the broadband connection and connect when booting?
Floor 8 Posted 2006-12-14 23:46 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline

Rasdial pppoe Your broadband account Your broadband password



Save the above command into a file named XXX.BAT, and then put this file into the "Startup" mentioned by Brother ccwan on the 6th floor. Once the computer starts, it will dial up : )

More detailed usage:


C:\WINDOWS>rasdial /?
Usage:
rasdial entryname ]



rasdial /DISCONNECT

rasdial

The command completed.


Test version: Windows Server 2003

[ Last edited by redtek on 2006-12-14 at 10:48 AM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
ccwan +5 2006-12-14 23:50
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 9 Posted 2006-12-14 23:57 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
Thank you to the friend above.

But when running on my machine, an error is prompted:

Remote access error 623 The system cannot find the phone book entry for this connection.

For detailed explanation of this error:
Please type "hh netcfg.chm" in Help
Click "Troubleshooting", select "Error Information", then type "623"


The system I am using is XP + SP2, and I manually turned off some services.
Is it related to the services that were turned off?
Floor 10 Posted 2006-12-15 00:01 ·  中国 辽宁 联通
银牌会员
★★★
Credits 1,212
Posts 464
Joined 2006-12-13 21:11
19-year member
UID 73417
Gender Male
Status Offline
@echo off
start=RASDIAL "AccessRunner ADSL" bx8833345 bx8833345

Copy the above content into Notepad, then save it as SW.BAT (make sure to select "All Files" for the save type). Then just double-click SW.BAT to go online.

Note: The above "AccessRunner ADSL" is the name of the dial-up connection, bx8833345 is the username, and the following bx8833345 is the password. You need to change it to your own
Floor 11 Posted 2006-12-15 00:02 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
Using a VBS script, you can achieve "silent" (without the black CMD box):


dim wsh
set wsh=WScript.CreateObject("WScript.Shell")
wsh.run "Rasdial pppoe your broadband account your broadband password",false,1

Save the above code as Rasdial.vbs and put it in the startup folder.
Floor 12 Posted 2006-12-15 00:18 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
Thanks to the two friends on the 10th and 11th floors.
I tried both of yours.
The 10th floor had no prompts and no reaction.
The 11th floor had an error prompt:

Script: C:\Documents and Settings\fastrun\ Start Menu\Programs\Startup\Rasdial.vbs
Line: 3
Character: 18
Error: Statement not ended
Code: 800A0401
Source: Microsoft VBScript compilation error

[ Last edited by fastrun on 2010-3-22 at 15:26 ]
Floor 13 Posted 2006-12-15 00:25 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
Show me your Rasdial.vbs script
Floor 14 Posted 2006-12-15 00:27 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
Just set up the automatic connection.
Floor 15 Posted 2006-12-15 00:28 ·  中国 吉林 长春 联通
初级用户
Credits 46
Posts 24
Joined 2006-12-13 23:06
19-year member
UID 73425
Gender Male
Status Offline
dim wsh
set wsh=WScript.CreateObject("WScript.Shell")
wsh.run "Rasdial pppoe hechpr000 13617234",false,1
Forum Jump: