@echo off
echo (1).家庭网络
echo (2).办公网络
echo (3).退出
set /p x= 选择你要设置的网络:
if %x%==1 goto a
if %x%==2 goto b
if %x%==3 goto c
:a
netsh interface ip set address "本地连接" static 192.168.0.254 255.255.255.0 192.168.0.1 1
netsh interface ip set dns "本地连接" static 8.8.8.8
netsh interface ip add dns "本地连接" 8.8.4.4
echo 开始清楚IE代理设置
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "168.1.255.251:80" /f
exit
:b
netsh interface ip set address "本地连接" static 168.1.110.210 255.255.255.0 168.1.110.254 1
netsh interface ip set dns "本地连接" static 168.1.255.251
echo 开始设置IE代理上网
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "168.1.255.251:80" /f
exit
:c exit
保存为 切换ip.bat,双击执行即可.