将你的网站设置为客户的信任站点--WSH方案

2018-09-06 13:21

阅读:757

  将代码存为TrustedSite.js,在客户端执行

  var SiteName=Acmnet
SetTrustSite(SiteName);
WScript.Echo(You have accept

  
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;
}

  


评论


亲,登录后才可以留言!