是否可以借助脚本更改Internet Explorer 8的LAN设置中的自动配置脚本地址?

tur*_*o88 7 internet-explorer automation wsh internet-explorer-8

我在Internet Explorer 8的LAN设置中使用了2个不同的自动配置脚本地址.在我的工作过程中,我需要经常在它们之间切换.每次我必须手动完成.

有没有办法可以通过脚本或其他东西自动化它,这样我可以随时在它们之间切换?

Sun*_*man 12

您可以在批处理文件(.bat文件)中使用以下命令.批处理文件的使用使您无需进行如此多的UI单击以执行将值分配给Internet选项中的"使用自动配置脚本"文本框的简单任务 - >高级设置.

使用自动配置脚本

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://www.xxxxx.com:1234/sampleScript" /f
Run Code Online (Sandbox Code Playgroud)

结果如下:

在此输入图像描述

清除那个领域

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f
Run Code Online (Sandbox Code Playgroud)


Dji*_*ouf 5

如果您可以使用 PowerShell:

设置属性

Set-ItemProperty -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name AutoConfigURL -Value 'http://www.yourdomain.com/config.pac'
Run Code Online (Sandbox Code Playgroud)

清除财产

Remove-ItemProperty -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name AutoConfigURL
Run Code Online (Sandbox Code Playgroud)