@echo off
echo pls input ip type 1:auto;2 suc
set /p a=
if "%a%"=="1" goto auto
if "%a%"=="2" goto suc
goto failed
:auto
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
goto end
:suc
netsh interface ip set address "本地连接" static 192.168.0.11 255.255.255.0 192.168.0.1
netsh interface ip set dns name="本地连接" source=static addr=128.124.168.40
goto end
:failed
echo input error
echo %a%
:end
pause