切换IE浏览器代理开关.bat
生活随笔
收集整理的這篇文章主要介紹了
切换IE浏览器代理开关.bat
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
切換IE瀏覽器代理開關.bat
::注釋符號 ::echo off 表示在此語句后所有運行的命令都不顯示命令行本身,@表示不顯示此行 命令行本身 @echo off ::窗口標題 TITLE IE瀏覽器代理設置 ::窗口大小 mode con lines=18 cols=55 ::窗口位置 set rr="HKCU\Console\%%SystemRoot%%_system32_cmd.exe" reg delete %rr% /f>nul reg add %rr% /v "WindowPosition" /t REG_DWORD /d 0x00240200 /f>nul::操作注冊表 打開代理設置 直接設置 ::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 ProxyEnable /t REG_DWORD /d 0 /f::%%i %%j %%k對應 注冊表三個字段 for /f "tokens=1,2,* " %%i in ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable ^| find /i "ProxyEnable"') do set "regvalue=%%k" ::echo 注冊表值為%regvalue%if %regvalue%==0x0 goto open goto close:open echo 正在打開IE瀏覽器代理設置 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f ipconfig /flushdns start "" "C:\Program Files\Internet Explorer\iexplore.exe" taskkill /f /im iexplore.exe goto END :close echo 正在關閉IE瀏覽器代理設置 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f ipconfig /flushdns start "" "C:\Program Files\Internet Explorer\iexplore.exe" taskkill /f /im iexplore.exe goto END::暫停屏幕 ::pause :END echo 3秒后自動關閉本窗口... ::利用ping 達到睡眠功能。輸出到空設備 防止顯示ping信息 ping -n 2 127.0.0.1>nul總結
以上是生活随笔為你收集整理的切换IE浏览器代理开关.bat的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 论如何刷微信运动步数
- 下一篇: 2017年html5行业报告,云适配发布