1. 程式人生 > >切換IP及DNS上網一鍵指令碼設定

切換IP及DNS上網一鍵指令碼設定

@echo off
echo 如360等安全軟體攔截請務必選擇允許
echo 正在為您設定可用DNS
echo 若仍無法上網請手動設定為自動獲取DNS
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
netsh interface ip set dns name="本地連線" source=static addr=223.5.5.5 register=PRIMARY
netsh interface ip add dns name="本地連線" addr=180.76.76.76 index=2
netsh interface ip set dns name="無線網路連線" source=static addr=223.5.5.5 register=PRIMARY
netsh interface ip add dns name="無線網路連線" addr=180.76.76.76 index=2
ipconfig/flushdns
echo 即將自動退出。。。
ping -n 10 127.0>nul