Thank you for your support.One-click setting to easily convert IP addresses. A friend sent an email asking me how to set the IP address with one click in Windows 2000 to achieve the effect of converting IP addresses easily, because the method described in the previous article cannot work in the 2000 system. So I tested it. In fact, the code is similar, and only a few modifications are needed.
The code of the 2000 program is as follows:
Code
@ Echo off
Rem eth // set the NIC name. If the English version is 2000, set eth = Local Area Connection
Set eth = "Local Connection"
Rem ip // set the IP address. To use the ip address for the first time, change it to the applicable IP address.
Set ip = 10.200.121.57
Rem gw // set the Gateway
Set gw = 10.200.121.254
Rem netmasks // sets the subnet mask.
Set netmasks = 255.255.255.0
Rem dns1 // set dns1
Set dns1 = 202.204.192.1
Rem dns2 // set dns2
Set dns2 = 202.204.193.1
Echo setting local IP address as: % ip %
Netsh interface ip set address "% eth %" static % ip % netmasks % gw % gwmetric = 1
Netsh interface ip set dns "% eth %" static % dns1 %
Netsh interface ip add dns "% eth %" % dns2 %
Ipconfig/all
Pause
Close
According to the code comment, change it to your own IP address, copy the above Code to notepad, and save it in bat format. If the IP address is automatically obtained, the Code is as follows: Code
@ Echo off
Rem eth // set the NIC name. If the English version is 2000, set eth = Local Area Connection
Set eth = "Local Connection"
Echo setting local IP address as: DHCP
Netsh interface ip set address "% eth %" DHCP
Netsh interface ip set dns "% eth %" DHCP
Pause
Close
The above program runs successfully in Windows 2000. Thank you for your question!