将你的网站设置为客户的信任站点--WSH方案
发布时间:2006-10-14 2:59:58   收集提供:gaoqian
发布于:2002-1-1
将代码存为TrustedSite.js,在客户端执行

var SiteName="Acmnet"
SetTrustSite(SiteName);
WScript.Echo("You have accept 'http://acmnet/' as your Trusted Site");


function SetTrustSite(StrSiteName)
{
var WshShell=WScript.CreateObject("WScript.Shell");
WshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains\\"+StrSiteName+"\\http", 2 ,"REG_DWORD");
TrustedSite_Value=WshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains\\"+StrSiteName+"\\http");
delete WshShell;
}
 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50