将可信站点添加到IE本地Intranet

时间:2016-08-12 10:36:59

标签: internet-explorer vbscript windows-7

我正在尝试制作一个VBScript,它会在图片中添加IE本地Intranet设置的例外情况。我假设这可以从我读过的内容中获得。

enter image description here

我尝试了几种解决方案,包括以下方案,感觉我无处可去! 该脚本将在Windows 7 Pro计算机上运行,​​如果有任何帮助的话。

AddTrustedSite "//192.168.0.10"

Function AddTrustedSite(strDomainName)
    Set WshShell = Wscript.CreateObject("Wscript.Shell")
    strRegKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\"
    WshShell.RegWrite strRegKey & strDomainName & "\", "", "REG_SZ"
    WshShell.RegWrite strRegKey & strDomainName & "\*", "2", "REG_DWORD"
End Function

1 个答案:

答案 0 :(得分:1)

这适用于常规网络 但是当在域下的PC上使用它时,它会说错误的用户名或密码。我发现它时会发布域名的额外细节。

 AddTrustedSite "Range1"

Function AddTrustedSite(strDomainName)
    Set WshShell = Wscript.CreateObject("Wscript.Shell")
    strRegKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\"
    WshShell.RegWrite strRegKey & strDomainName & "\", "", "REG_SZ"
    WshShell.RegWrite strRegKey & strDomainName & "\:Range", "192.168.0.10", "REG_SZ"
    WshShell.RegWrite strRegKey & strDomainName & "\file", "1", "REG_DWORD"
End Function