對於經常穿梭於不同地點
網段各種詭異各種奇葩
C代碼
@echo off
@rem 設置需要使用的代理服務器地址==============================
set ProxyServerValue=
@rem 無需使用代理服務器的地址
set ProxyOverrideValue=
@rem ============================================================
:menu
cls
echo
echo IP設置腳本(不區分大小寫)
echo ==================================
echo
echo
echo
echo
echo
echo
echo
echo
echo ==================================
echo P: 設置代理
echo N: 取消代理
echo EB: 啟用本地連接
echo DB: 禁用本地連接
echo EW: 啟用無線連接
echo DW: 禁用無線連接
echo Q: 退出
echo
@echo off
set /p input=選擇上網地點並回車
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
if
:IP_
netsh interface ip set address
netsh interface ip set dnsservers
goto end
:IP_
netsh interface ip set address
netsh interface ip set dnsservers
goto end
:IP_
netsh interface ip set address
netsh interface ip set dnsservers
goto end
:IP_
netsh interface ip set address
netsh interface ip set dnsservers
goto end
:IP_
netsh interface ip set address
netsh interface ip set dnsservers
goto end
:IP_
netsh interface ip set address
netsh interface ip set dnsservers
goto end
@rem ===============================================================
:IP_P
reg add
reg add
reg add
goto end
@rem ======================================================
:IP_N
reg add
goto end
:IP_EB
netsh interface set interface name=
goto end
:IP_DB
netsh interface set interface name=
goto end
:IP_EW
netsh interface set interface name=
goto end
:IP_DW
netsh interface set interface name=
goto end
:end
goto menu
From:http://tw.wingwit.com/Article/Network/201311/30056.html