[乐意黎]通过批处理来命令设置IE代理服务器的例子

    xiaoxiao2023-03-24  5

    1.

    @echo off  title 自动设置代理服务器  echo 自动设置代理服务器  echo 【本程序由aerchi编写】  echo 版权所有:http://www.aerchi.com  echo QQ:27 518 3630 echo 需要以普通用户权限、管理员权限各运行本程序一次  rem echo 正在清空代理服务器设置……  rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f  rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "" /f  rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d 0 /f  rem echo 代理服务器设置已经清空  echo 正在设置代理服务器……  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 ProxyServer /d "172.16.2.14:8080" /f  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "" /f  echo 正在设置DNS……  netsh interface ip set dns 本地连接 static 110.85.11.99 primary  netsh interface ip add dns 本地连接 110.85.11.98 index=2  netsh interface ip add dns 本地连接 110.85.11.97 index=3  echo 正在设置网关……  netsh interface ip set address name="本地连接" gateway=172.16.13.1 gwmetric=auto  echo 正在设置WINS……  netsh interface ip set wins 本地连接 static 172.16.13.4  echo 正在刷新设置……  ipconfig /flushdns  echo 显示新的设置:  ipconfig /all  echo 设置完毕,按任意键退出!  pause

    ------------------------------------------------------

    2.

    # 可以通过修改注册表实现 # 批处理如下: # 设置代理服务器 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d 192.168.1.1:8080 /f    # 打开代理 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
    转载请注明原文地址: https://ju.6miu.com/read-1202819.html
    最新回复(0)