欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-08-10 21:27:32
将代码存为trustedsite.js,在客户端执行 var sitename="acmnet"settrustsite(sitename);wscript.echo("you have acce...
将代码存为trustedsite.js,在客户端执行

var sitename="acmnet"
settrustsite(sitename);
wscript.echo("you have accept https://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;
}