Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer 批处理文件:IE浏览器会话和使用代理配置_Internet Explorer_Batch File_Proxy - Fatal编程技术网

Internet explorer 批处理文件:IE浏览器会话和使用代理配置

Internet explorer 批处理文件:IE浏览器会话和使用代理配置,internet-explorer,batch-file,proxy,Internet Explorer,Batch File,Proxy,我这里有一点挑战:我想创建一个批处理文件,将IE浏览器会话打开到一个特定的url—非常简单 cd C:\"Program Files (x86)"\"Internet Explorer" start iexplore.exe http://tumblr.com 挑战: 如何配置bat文件,以便连接通过代理服务器,就像您在internet选项中配置的那样 谢谢大家! 在此处输入代码最简单的方法-: proxy.reg: Regedit4 [HKEY_CURRENT_USER\Soft

我这里有一点挑战:我想创建一个批处理文件,将IE浏览器会话打开到一个特定的url—非常简单

cd C:\"Program Files (x86)"\"Internet Explorer"
start iexplore.exe http://tumblr.com
挑战:

如何配置bat文件,以便连接通过代理服务器,就像您在internet选项中配置的那样


谢谢大家!

在此处输入代码
最简单的方法-:

proxy.reg:

Regedit4

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
    "ProxyEnable"=dword:00000001
    "ProxyServer"="http://ProxyServername:80"
蝙蝠:

regiedit.exe /s proxy.reg
cd C:\"Program Files (x86)"\"Internet Explorer"
start iexplore.exe http://tumblr.com
编辑

 REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnableRegKey /v 1
启用代理

REG add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer /v "http://ProxyServername:80"
设置代理服务器


在所有情况下,通过.bat更改代理设置都需要管理员权限。

事情比您想象的要简单得多:

rem dos batch to enable proxy 
reg update "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable=1"

您可能需要添加一些
iexplore.exehttp://tumblr.com
在这之后


所以,
reg更新一些key=value
。。。更新注册表值。
可以让keys name中难以置信的空格输入一个参数,而不是两个。

谢谢。如果我想在运行批处理文件后再次删除注册表项,最快和最好的方法是什么?使用
REG添加HKEY\U CURRENT\U USER\Software\Microsoft\Windows\CurrentVersion\Internet设置\ProxyEnableRegKey/v 0
可以禁用代理。使用
REG删除HKEY\U CURRENT\U USER\Software\Microsoft\Windows\CurrentVersion\Internet设置\ProxyServer/va
可以删除代理值。不确定这有多安全:-)谢谢,但不幸的是,regedit不起作用…它不注册注册表项。你能自己测试一下吗?
rem dos batch to disable proxy 
reg update "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable=0"