<span style= "FONT-SIZE:14PX;" ><span style= "FONT-SIZE:18PX;" ><strong><span style= "Font-family:simhei;" > Bat Processing command to switch IP configuration steps:</span></strong></span>
</span><pre name= "code" class= " Plain "><span style=" FONT-SIZE:18PX; > New txt text document,</span>
Copy the code below the split line,
Paste into txt document,
Modify the IP configuration below red according to your needs
Save and modify the file suffix to. bat
--------------------------------------Split Line---------------------------------------------------
@echo off
Color 1
Title Setting the Internet environment
echo★★★★ Please choose the Internet environment ★★★★
Echo company fixed mode ———— > Please press 1
echo Home Auto Mode ———— > Press 2
set/p n=
if/i "%n%" equ "1" goto guding
if/i "%n%" equ "2" goto Zidong
: guding
Echo you selected the company fixed IP mode
Echo is setting up, please later ...
netsh interface ipv4 set address name= "Local Area Connection" source=static
addr=10.10.90.6 mask=255.255.255.0 gateway=10.10.90.1 gwmetric=0 >nul
Echo is adding native primary DNS ...
netsh interface ipv4 set DNS name= "Local Area Connection" source=static
addr=202.101.172.47 register=primary
#echo Adding alternate DNS ...
#netsh interface IPv4 Add DNS name= "Local Area Connection"
addr=202.102.199.68
Goto END
: Zidong
echo You have selected home Auto capture mode
Echo is setting up, please later ...
echo automatically gets the IP address ....
@echo off
netsh interface ip set address name = "Local Area Connection" Source = DHCP
echo Auto Get DNS server ....
netsh interface ip set dns name = "Local Area Connection" Source = DHCP
Goto END
: End
Color 2
echo☆☆☆☆☆☆☆☆ the current IP configuration for this machine is as follows ☆☆☆☆☆☆☆☆☆☆☆☆
Ipconfig
echo☆☆☆☆☆☆☆☆ Setup Success! Thanks for using ☆☆☆☆☆☆☆☆☆☆☆☆
Pause
--------------------------------------------Split Line------------------------------------------------------------