电脑技术学习

修改注册表添加信任站点及启用Activex控件

dn001

////////////////////////////////////////////////////////////////////////
//
//;添加信息站点及将指定IP添加到本地Intranet中,
//;"*"=dword:00000002 表示受信任的站点区域
//;"*"=dword:00000001 表示本地 Intranet 区域
//
////////////////////////////////////////////////////////////////////////

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRanges]
@=""

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange100]
"*"=dword:00000002
":Range"="192.168.10.121"

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101]
"*"=dword:00000001
":Range"="192.168.10.121"

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2]
@=""
"DisplayName"="可信站点"
"CurrentLevel"=dword:00001000
"Flags"=dword:00000043
"1004"=dword:00000000
"1201"=dword:00000000
"1402"=dword:00000000
"2201"=dword:00000000

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones1]
@=""
"DisplayName"="本地 Intranet"
"CurrentLevel"=dword:00000000
"1001"=dword:00000000
"1004"=dword:00000000
"1201"=dword:00000000

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3]
@=""
"DisplayName"="Internet"
"CurrentLevel"=dword:00000000
"1001"=dword:00000000
"1004"=dword:00000000
"1201"=dword:00000000


/////////////////////////////////////////////////////////////////////////////
//
// 通过网页修改activex安全设置,添加信任站点,禁用弹出窗口阻止程序
//
/////////////////////////////////////////////////////////////////////////////

信任站点的注册表项

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange[*]

ActiveX的注册表项

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones[0-4][*]

[0-4]

值设置
------------------------------
0; 我的电脑
1; 本地 Intranet 区域
2; 受信任的站点区域
3; Internet 区域
4; 受限制的站点区域

[*]

1001;;;;下载已签名的 ActiveX 控件
1004;;;;下载未签名的 ActiveX 控件
1200;;;;运行 ActiveX 控件和插件
1201;;;;对没有标记为安全的 ActiveX 控件进行初始化和脚本运行
1405;;;;对标记为可安全执行脚本的 ActiveX 控件执行脚本
2201;;;;ActiveX 控件自动提示 **

弹出窗口阻止程序的注册表项

HKEY_CURRENT_USERHKCUSoftwareMicrosoftInternet ExplorerNew WindowsPopupMgr

具体脚本如下:

<SCRIPT LANGUAGE="JavaScript">
<!--
var WshShell=new ActiveXObject("WScript.Shell");
//添加信任站点ip

WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange100","");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange100http","2","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange100:Range","192.168.0.1");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101","");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101http","2","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101:Range","192.168.0.2");
//修改IE ActiveX安全设置

WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones31001","0","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones31004","0","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones31200","0","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones31201","0","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones31405","0","REG_DWORD");
WshShell.RegWrite("HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones32201","0","REG_DWORD");
//禁用xinxp弹出窗口阻止程序

WshShell.RegWrite("HKCUSoftwareMicrosoftInternet ExplorerNew WindowsPopupMgr","no");

alert("active控件安全设置,弹出窗口设置,信任站点设置成功");
//-->

</SCRIPT>

标签: 控件