中国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-12 20:51
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » [Original] Fully Automatic Tool for Setting Machine Numbers and IP (Absolutely Practical)
Printable Version  25,820 / 148
Floor1 qasa Posted 2007-01-19 17:40
高级用户 Posts 311 Credits 959 From 广东-LianJiang
### Fully Automatic Machine Number and IP Setting Tool
Haha, after half a month of study, my first big work is finally completed!!!
Put it up to share with colleagues in the internet café industry. If everyone thinks it's useful, give the little brother some points as an encouragement, hehehe :D

For more complete functions, please see:

http://www.cn-dos.net/forum/viewthread.php?tid=26870&fpage=7&highlight=&page=2

Automatic IP Change Version 2.0
http://www.cn-dos.net/forum/viewthread.php?tid=28621&fpage=2

Fully Automatic Machine Number and IP Setting Tool Version 3.0 (Full Version)
http://www.cn-dos.net/forum/viewthread.php?tid=32490&fpage=4

ip.bat


MAC.ini


DNS.ini


Just modify MAC.ini and DNS.ini according to your actual requirements. :P

[ Last edited by qasa on 2007-8-5 at 02:45 PM ]

Attachments
全自动设置机号、IP工具.rar (1.27 KiB)
Floor2 qasa Posted 2007-01-19 17:43
高级用户 Posts 311 Credits 959 From 广东-LianJiang
echo %date% %time%Newly discovered MAC address:>>NewMAC.ini&echo !mac! >>NewMAC.ini
NewMAC.ini can be changed to \\Server address\Shared directory\NewMAC.ini
Floor3 qasa Posted 2007-01-19 17:46
高级用户 Posts 311 Credits 959 From 广东-LianJiang
I would like to express my gratitude to brother everest79 and brother lxmxn for their guidance.

[ Last edited by qasa on 2007-1-19 at 06:26 PM ]
Floor4 qasa Posted 2007-01-19 17:51
高级用户 Posts 311 Credits 959 From 广东-LianJiang
There is a strange thing during the test:

for /l %%w in (1,1,2) do (
netsh interface IP Set Address "Local Area Connection" Static %2 %zwym_% %workgate_% 1 >nul
)

If I don't loop twice, I need to run the program twice in a row to change the gateway. This needs to be guided by an expert.
Floor5 qasa Posted 2007-01-20 06:34
高级用户 Posts 311 Credits 959 From 广东-LianJiang
Why isn't there anyone supporting such a practical thing??
Floor6 hsting Posted 2007-01-20 06:39
初级用户 Posts 26 Credits 63
Push it up, study it
Floor7 lxmxn Posted 2007-01-20 07:10
版主 Posts 4,938 Credits 11,386

I'm glad about this original work of yours, plus points~
Floor8 qasa Posted 2007-01-20 10:57
高级用户 Posts 311 Credits 959 From 广东-LianJiang
Hehe, thank you, senior, for recognizing my hard work.
Floor9 everest79 Posted 2007-01-20 13:40
金牌会员 Posts 1,127 Credits 2,564
When testing, there is a strange thing. For the code:
for /l %%w in (1,1,2) do (
netsh interface IP Set Address "本地连接" Static %2 %zwym_% %workgate_% 1 >nul
)
If I don't loop...

The IP and mask are changed, but the gateway needs to be changed twice to take effect?
Floor10 everest79 Posted 2007-01-20 13:43
金牌会员 Posts 1,127 Credits 2,564
Why doesn't the LZ put dns.ini and mac.ini together with the batch file? The three files are a bit messy.

::D=202.96.128.86=202.96.128.186|192.168.0.1|255.255.255.0
::M=00-0A-EB-21-A7-EC=192.168.0.5|-005
...........
Floor11 qasa Posted 2007-01-20 14:29
高级用户 Posts 311 Credits 959 From 广东-LianJiang
Originally posted by everest79 at 2007-1-20 13:43:
Why doesn't the LZ put dns.ini and mac.ini together with the batch file? The three files are a bit messy

::D=202.96.128.86=202.96.128.186|192.168.0.1|255.255.255.0
::M=00-0A-EB-21-A7-EC=192.168.0.5|-005 ...


This is for easy understanding and convenient modification, to avoid accidentally changing other parts when modifying the MAC address; the most important thing is that whoever sees it will know how to use it, which is the most important. Hehe
Floor12 vlq5299 Posted 2007-01-20 23:25
初级用户 Posts 59 Credits 136
Thanks
Floor13 561808275 Posted 2007-01-21 04:49
新手上路 Posts 3 Credits 6
The LZ really thinks about newbies. I can't bear to not top it~~~~~
This program is really a great help in internet cafes, reducing a lot of work. Awesome
Floor14 qasa Posted 2007-01-21 09:09
高级用户 Posts 311 Credits 959 From 广东-LianJiang
After debugging, when changing the computer name, these two lines of statements can be deleted without affecting the operation

REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName /v "ComputerName" /t REG_SZ /d %3 /f >nul 2>NUL
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v "ComputerName" /t REG_SZ /d %3 /f >nul 2>NUL
Floor15 qasa Posted 2007-01-24 07:09
高级用户 Posts 311 Credits 959 From 广东-LianJiang
I'll give it a self-promotion to help those in need see this post, hehee
1 2 3 410  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023