明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

將你的網(wǎng)站設(shè)置為客戶的信任網(wǎng)站--WSH方案

[摘要]將代碼存為TrustedSite.js,在客戶端執(zhí)行 var SiteName="Acmnet"SetTrustSite(SiteName);WScript.Echo("...
將代碼存為TrustedSite.js,在客戶端執(zhí)行

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