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-05 08:00
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How does the automatic dial - up program rasdial support variables? View 1,430 Replies 7
Original Poster Posted 2006-12-07 18:58 ·  中国 广西 柳州 电信
初级用户
Credits 20
Posts 8
Joined 2006-11-11 15:36
19-year member
UID 70234
Gender Male
Status Offline
Program:
rasdial 连接 name username password

The internet access in the internet cafe is to be changed from shared access to PPPOE dial-up access, but it is a heavy workload to change the username and password for each computer one by one. I hope to use a batch script to solve this. The router I use is ros, and the username and password can be set by myself. I don't want to use the same user to connect, but want each computer to use a different user to connect. Originally, I wanted to use %computername%, but this command rasdial doesn't support it. I don't know if there are other methods to make this command support variables...
Floor 2 Posted 2006-12-08 00:28 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Who told you about the %computername% variable? Tell me and I'll shoot him!

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 3 Posted 2006-12-08 01:02 ·  中国 广东 河源 电信
中级用户
★★
Credits 266
Posts 98
Joined 2006-04-21 20:29
20-year member
UID 54223
Gender Male
Status Offline
In ROS, set different account numbers but the same password... Put the bat in the server and call it without interface using VBS~~`

echo %computername%>a.txt
for /f %%i in (a.txt) do set b=%%i
radsidal pppoe %b% password

[ Last edited by zerostudy on 2006-12-8 at 01:03 AM ]
纵是千年万年 亦难以忘记
Floor 4 Posted 2006-12-08 02:39 ·  中国 广西 柳州 电信
初级用户
Credits 20
Posts 8
Joined 2006-11-11 15:36
19-year member
UID 70234
Gender Male
Status Offline
%computername% is supported... Don't believe it, create a .bat with your computer name and run it. It just seems like this command doesn't support this variable... Thanks to the expert on the third floor... I'm testing it.
Floor 5 Posted 2006-12-08 02:41 ·  中国 广西 柳州 电信
初级用户
Credits 20
Posts 8
Joined 2006-11-11 15:36
19-year member
UID 70234
Gender Male
Status Offline
Fall down... Expert on the third floor... The command was typed wrong. It's rasdial, not radsidal. But your way of structuring the command completely solved my problem... Thanks a lot
Floor 6 Posted 2006-12-08 03:00 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
set b=%computername%
rasdial pppoe %b% password
Not sure if it will work?!
Floor 7 Posted 2007-06-20 19:31 ·  中国 广西 梧州 电信
新手上路
Credits 5
Posts 3
Joined 2006-11-21 04:48
19-year member
UID 71207
Gender Male
Status Offline
That's really sharp... I like you
Floor 8 Posted 2007-07-04 05:19 ·  中国 河北 唐山 联通
银牌会员
★★★
Credits 1,148
Posts 514
Joined 2007-06-01 12:51
19-year member
UID 89959
Gender Male
From 河北
Status Offline
How to deal with dynamic IP? Experts, please share your insights.
Forum Jump: