![]() |
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-10 16:16 |
47,811 topics / 349,897 posts / today 0 new / 48,255 members |
| DOS疑难解答 & 问题讨论 (解答室) » How to compile a batch file to modify the IP under DOS (XP)? |
| Printable Version 2,338 / 3 |
| Floor1 ily2013 | Posted 2005-09-19 01:36 |
| 中级用户 Posts 83 Credits 247 | |
|
I found some information online. The following command can be used to change the local area network IP address:
netsh interface ip set address "Local Area Connection" static 192.168.1.106 255.255.255.0 192.168.1.1 1 When I put this line into a batch file, it doesn't work. Could you all, dear experts, please tell me how to write this batch file? Also, how can I loop to change IPs (within a certain range)? Can I change the MAC address using a batch file under XP without restarting? Thank you, dear experts, and happy Mid-Autumn Festival! |
|
| Floor2 JonePeng | Posted 2005-09-19 20:47 |
| 金牌会员 Posts 1,883 Credits 4,562 From 广东广州 | |
|
Since the Netsh command enters another command-line state when running and requires additional commands to be input, you should first create a text file containing the commands that need to be input after Netsh, and then import this file using Netsh. That is:
First, use a text editor (such as Edit or Notepad) to input: Then save it with any file name, such as change.txt. Then use the netsh command and the "<" import operator to take change.txt as the input source: netsh <change.txt |
|
| Floor3 ronin | Posted 2005-11-12 13:27 |
| 中级用户 Posts 111 Credits 421 | |
Originally posted by JonePeng at 2005-9-19 08:47 PM: After trying this according to this, a situation of non-stop occurs, and it keeps running, which is running under XP |
|
| Floor4 ronin | Posted 2005-11-12 14:00 |
| 中级用户 Posts 111 Credits 421 | |
|
Manual input is okay, but when using batch processing, an error occurs, and the command keeps running without stopping.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |