中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-05 06:46
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » How does the automatic dial - up program rasdial support variables?
Printable Version  1,427 / 7
Floor1 cldiyer Posted 2006-12-07 18:58
初级用户 Posts 8 Credits 20
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...
Floor2 electronixtar Posted 2006-12-08 00:28
铂金会员 Posts 2,672 Credits 7,493
Who told you about the %computername% variable? Tell me and I'll shoot him!
Floor3 zerostudy Posted 2006-12-08 01:02
中级用户 Posts 98 Credits 266
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 ]
Floor4 cldiyer Posted 2006-12-08 02:39
初级用户 Posts 8 Credits 20
%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.
Floor5 cldiyer Posted 2006-12-08 02:41
初级用户 Posts 8 Credits 20
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
Floor6 zh159 Posted 2006-12-08 03:00
金牌会员 Posts 1,467 Credits 3,687
set b=%computername%
rasdial pppoe %b% password
Not sure if it will work?!
Floor7 kennylam Posted 2007-06-20 19:31
新手上路 Posts 3 Credits 5
That's really sharp... I like you
Floor8 shanliang8008 Posted 2007-07-04 05:19
银牌会员 Posts 514 Credits 1,148 From 河北
How to deal with dynamic IP? Experts, please share your insights.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023