中国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-04 11:26
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » [Help] How to implement ADSL connection in batch processing
Printable Version  2,433 / 15
Floor1 cares Posted 2007-04-25 06:43
初级用户 Posts 8 Credits 20 From 浙江
─────────────────── Moderation Record ────────────────────
Performer: lxmxn
Original Title: Please Come in, Batch Processing Experts
Description: The title is too vague, which is not convenient for forum search and management. Please modify the title within three days.
Prompt: To modify the title, click Edit at the bottom right of the current post, and then click Edit Post after modification.
Punishment: Since it is a new forum user, no punishment is temporarily given; if the title is not modified after three days, 2 points will be deducted as punishment, and the moderator will forcefully modify the title. Please click here to read the forum posting regulations to avoid posting violations in future discussions.
─────────────────── Moderation Record ────────────────────

Hello, experts..
ADSL connection in batch processing code
I want to make a small batch processing file. Please, experts, can you send me a section of code according to my steps. Thank you here.
Steps: 1. Open the browser, path D:/maxthon.exe
2. Open the ADSL connection
3. Open the specified web pages (http://www.126.com and http://www.163.com and www.sina.com.cn)
4. Close the specified web pages
5. Disconnect the ADSL connection
(Note: Repeat the operation of "2——5" 1000 times and then end)

[ Last edited by cares on 2007-4-25 at 01:23 PM ]
Floor2 lxmxn Posted 2007-04-25 07:56
版主 Posts 4,938 Credits 11,386
As far as I know, batch processing cannot close the built-in web page of Maxthon, only the Maxthon.exe process. So if it has to be done according to your requirements, it is estimated that the code cannot be written.
Floor3 cares Posted 2007-04-27 02:08
初级用户 Posts 8 Credits 20 From 浙江
Oh no... Then what should we do??
Floor4 tantan2010 Posted 2007-04-27 05:06
新手上路 Posts 4 Credits 6
Using Maxthon, if you open the same web page each time, you can consider treating the opened web page as a shortcut group and just close Maxthon directly
Floor5 cares Posted 2007-04-28 01:40
初级用户 Posts 8 Credits 20 From 浙江
How to set it up,, ask for advice,, but opening MAXTHON is very slow oh... Hehe
Also, may I ask if you can write such code for me?
1. Connect ADSL
2. Open the browser
3. Close the browser
4. Disconnect,
Loop this operation.. Thanks

How to add a loop statement.. For example, my code is like this

@echo off
ping 126.com -n 1

rem Set the connection name, ADSL account, ADSL password
set MyConnection=Change to your connection name
set MyUsername=Change to your ADSL account
set MyPassword=Change to your ADSL password

echo Connecting ADSL: %MyConnection% ...
Rasdial %MyConnection% %MyUsername% %MyPassword%
echo Connected: %MyConnection%

echo Starting Maxthon...
start D:\Program\Maxthon\Maxthon.exe
echo Started Maxthon

Rasdial %MyConnection% /disconnect
echo Disconnected ADSL connection: %MyConnection%

[ Last edited by cares on 2007-4-27 at 01:01 PM ]
Floor6 lxmxn Posted 2007-04-28 01:57
版主 Posts 4,938 Credits 11,386
```
@echo off
:begin
rasdial 网络连接 username password
start Maxthon.exe
ping 127.1 -n 5 >nul
taskkill /f /im Maxthon.exe
rasdial 网络连接 /disconnect
goto :begin


[ Last edited by lxmxn on 2007-4-27 at 01:03 PM ]
```
Floor7 cares Posted 2007-04-28 02:03
初级用户 Posts 8 Credits 20 From 浙江
May I ask the moderator to explain the explanation of this code?
Floor8 lxmxn Posted 2007-04-28 02:06
版主 Posts 4,938 Credits 11,386
1. Use rasdial to connect to the network; Note: The network connection is the connection name, username is the user name, and password is the password for connection;
2. Open Maxthon;
3. Wait for about 4 seconds;
4. Close Maxthon;
5. Disconnect the connection;
6. Loop 1-5.
Floor9 cares Posted 2007-04-28 02:09
初级用户 Posts 8 Credits 20 From 浙江
Using rasdial to connect to the network??????
I don't understand very much... Excuse me... Can the ADSL at my own home be connected in this way too???
Floor10 lxmxn Posted 2007-04-28 02:12
版主 Posts 4,938 Credits 11,386
Why don't you just try it?
Floor11 cares Posted 2007-04-28 02:14
初级用户 Posts 8 Credits 20 From 浙江
Oh, okay. Thank you, moderator... I will definitely ask you again next time if I have questions...
Floor12 aaaaaa Posted 2007-04-30 00:06
初级用户 Posts 8 Credits 128
Hehe, it's probably vote stuffing. If only the captcha could be read. But unfortunately, no one can do that now.
Floor13 cares Posted 2007-04-30 23:12
初级用户 Posts 8 Credits 20 From 浙江
Moderator...It can't run...The following is correct..Can't connect...
Floor14 ebfok Posted 2007-05-01 00:19
初级用户 Posts 33 Credits 87 From cs
"rasdial 网络连接 username password"
Moderator lxmxn, you've been a great help to me~! I've been wanting to achieve automatic internet connection, and now it's finally done.
I love you to pieces, hoho
Floor15 honghunter Posted 2007-05-01 06:55
中级用户 Posts 135 Credits 321
It would be better if the password were not placed in plain text in the BAT.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023