@Echo Off

cls

echo.

echo.
 
echo -------------------按"A"键 切换到【  自 动 获 取 】 IP地址------------------

echo -------------------按"B"键 切换到【 192.168.8.41 】 IP地址------------------

echo -------------------按"C"键 切换到【 192.168.1.80 】 IP地址------------------

echo -------------------按"D"键 切换到【 192.168.0.80 】IP地址-------------------

echo                                                                                               —— by Jrade Luo !!!

echo.

SET Choice=

SET /P Choice=请选择操作项:

IF /I '%Choice:~0,1%'=='a' GOTO a

IF /I '%Choice:~0,1%'=='b' GOTO b

IF /I '%Choice:~0,1%'=='c' GOTO c

exit

:a

echo 开始自动获取IP地址...
netsh interface ip set address "无线网络连接" dhcp
netsh interface ip set dns "无线网络连接" dhcp
echo 修改为自动获取IP成功!

echo ------------------------所有操作成功!按任意键可退出--------------------------
pause>nul
exit

:b

echo 开始切换到【192.168.8.41】IP地址...
netsh interface ip set address "无线网络连接" static 192.168.8.41 255.255.255.0 192.168.8.1
netsh interface ip set dns "无线网络连接" static 61.177.7.1 register=Primary
netsh interface ip add dns "无线网络连接" 221.228.255.1
echo 修改为【192.168.8.41】成功!

echo ------------------------所有操作成功!按任意键可退出--------------------------
pause>nul
exit

:c

echo 开始切换到【192.168.1.80】IP地址...
netsh interface ip set address "无线网络连接" static 192.168.1.80 255.255.255.0 192.168.1.1
netsh interface ip set dns "无线网络连接" static 221.6.4.66 register=Primary
netsh interface ip add dns "无线网络连接" 58.240.57.33
echo 修改为【192.168.1.80】IP成功!

echo ------------------------所有操作成功!按任意键可退出--------------------------
pause>nul
exit

:d

echo 开始切换到【192.168.0.80】IP地址...
netsh interface ip set address "无线网络连接" static 192.168.0.80 255.255.255.0 192.168.0.1
netsh interface ip set dns "无线网络连接" static 221.6.4.66 register=Primary
netsh interface ip add dns "无线网络连接" 58.240.57.33
echo 修改为【192.168.0.80】IP成功!

echo ------------------------所有操作成功!按任意键可退出--------------------------
pause>nul
exit