将可信站点添加到 IE 本地内网 [英] Add trusted site to IE local intranet

查看:53
本文介绍了将可信站点添加到 IE 本地内网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个 VBScript,它将向 IE 本地 Intranet 设置添加例外,如图中所示.我假设从我读过的内容来看这是可能的.

I'm trying to make a VBScript that will add exceptions to IE local intranet settings like in the picture. I'm assuming this is possible from what I've read.

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

I tried several solutions including the following one, and it feels I'm going nowhere! The script will be running on Windows 7 Pro machines, if that is of any help.

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

推荐答案

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

This works for a regular network.
But when using it on a PC under domain, it says wrong username or password. I will post the extra details for domain when i find it.

 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

这篇关于将可信站点添加到 IE 本地内网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆