@echo off
@echo *
@echo **
@echo ***
@ ECHO 欢迎你,GISWIN!请您选择所需的网络设置:
@ ECHO 1、家庭网络 2、公司网络 3、退出
@ ECHO -----------------------------------------------------------------------
set /p what=请输入选择项(1、2、3)
if %what%==1 @echo off
if %what%==1 echo 开始设置....
if %what%==1 echo 设置动态获取IP.
if %what%==1 cmd /c netsh interface ip set address "本地连接" source=dhcp
if %what%==1 echo 设置动态获取dns.
if %what%==1 cmd /c netsh interface ip set dns "本地连接" source=dhcp
if %what%==1 title 自动清除IE代理
if %what%==1 echo 正在清空代理服务器设置……
if %what%==1 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
if %what%==1 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "" /f
if %what%==1 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d 0 /f
if %what%==1 echo 代理服务器设置已经清空
if %what%==1 echo 正在刷新设置……
if %what%==1 echo 恭喜!已完成所有设置.
if %what%==2 echo 开始设置IP.
if %what%==2 cmd /c netsh interface ip set address name="本地连接" source=static addr=128.2.*.* mask=255.255.0.0
if %what%==2 @echo 开始设置代理服务器
if %what%==2 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
if %what%==2 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "128.2.*.*:808" /f
if %what%==2 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "" /f
if %what%==2 echo 设置代理服务器成功!
if %what%==2 echo 恭喜!已完成所有设置.
if %what%==2 pause
if %what%==3 exit
总结网络方法,自己亲自写出。
已经验证通过,自己每天都在使用……