CSDN博客

img onlytiancai

蛙蛙推荐:通过注册表添加受信任站点

发表于2004/9/20 11:24:00  2489人阅读

分类: 示例代码

比如说我们要把www.21hb.com添加到客户的受信任站点
1.运行regedit,打开注册表,首先打开下面的键值
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Inte

rnet Settings/ZoneMap/Domains
2.在其下面新建一个项命名为"21hb.com"
3.在21hb.com下面再新建一个项,命名为"www"
4.在www下新键一个双字节子键,命名为"*","*"表示任何协议,你还可以把

"*"替换为"http","ftp"等其它名称
5.双击刚才新建的双字节子键"*",确保基数里选择是"十六进制",在数值

数据种填写"2"
6.关闭注册表

<SCRIPT LANGUAGE="JavaScript">
<!--
var WshShell=new ActiveXObject("WScript.Shell");
WshShell.RegWrite("HKCU//Software//Microsoft//Windows//CurrentVe

rsion//Internet Settings//ZoneMap//Domains//21hb.com","");
WshShell.RegWrite("HKCU//Software//Microsoft//Windows//CurrentVe

rsion//Internet Settings//ZoneMap//Domains//21hb.com//www","");
WshShell.RegWrite("HKCU//Software//Microsoft//Windows//CurrentVe

rsion//Internet

Settings//ZoneMap//Domains//21hb.com//www//http","2","REG_DWORD"

);
alert("写入成功");
//-->
</SCRIPT>

0 0

相关博文

我的热门文章

img
取 消
img