修改代理设置不能按批处理

时间:2018-06-18 11:01:21

标签: batch-file internet-explorer command-line proxy

我写了一个批处理文件来启用或禁用互联网设置中的代理。问题是变化发生了,我可以在RegEdit中看到。但是,在我打开“Internet设置”窗口并关闭它而不执行任何操作之前,不会应用任何内容。这意味着,应该执行刷新命令以应用注册表中的更改。

任何人都可以帮忙,我该怎么办呢?

此代码是启用代理:

@echo Estado
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
    @echo Proxy activado y configurado
    echo.
    pause

此代码用于禁用代理:

@echo Estado
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
    echo.
    @echo Proxy desactivado
    echo.
    pause

Thanx:)

0 个答案:

没有答案