切换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的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 论如何刷微信运动步数
- 下一篇: 普通人的2022前端秋招总结