@echo off
color 0a
title ……IP修改工具…… QQ 236189165
mode con cols=55 lines=25
:cho
echo.
echo. IP 快速修改工具 说明
echo.
echo. 1. 修改 ip 192.168.0.191 网关 192.168.0.1
echo. 2. 修改 ip 192.168.1.191 网关 192.168.1.1
echo. 3. 修改 ip 192.168.75.191 网关 192.168.75.254
echo. 4. 修改 ip 192.168.33.191 网关 192.168.33.254
echo. 5. 手动设置 ip 等参数
echo. 6. 退出
echo.
set choice=
echo.
set /p choice=请选择项目,回车确认:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="1" goto ip1
if /i "%choice%"=="2" goto ip2
if /i "%choice%"=="3" goto ip3
if /i "%choice%"=="4" goto ip4
if /i "%choice%"=="5" goto boby
if /i "%choice%"=="6" goto end
cls
echo.
echo 选择无效,请重新输入
echo.
goto cho
:ip1
netsh interface ip set address name="本地连接" source=static addr=192.168.0.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.0.1 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:ip2
netsh interface ip set address name="本地连接" source=static addr=192.168.1.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.1.1 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:ip3
netsh interface ip set address name="本地连接" source=static addr=192.168.75.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.75.254 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:ip4
netsh interface ip set address name="本地连接" source=static addr=192.168.33.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.33.254 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho