option explicit
dim sysurl
sysurl="docoa.com.cn"
call setIeSec(sysurl)

sub setIeSec(url)

 dim wshShell,urlPart,urlN,si,pos,urlType,urlHead,urlBody

 set WshShell=createObject("WScript.Shell")

 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.cn\",""
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.cn\*.docoa\http","2","REG_DWORD"
 'WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\"&url,null,null
 'WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\docoa.com.cn\editor\http","2","REG_DWORD"
 'WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\docoa.com.cn\author\http","2","REG_DWORD"

 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1001","0","REG_DWORD"	'下载已签名的ActiveX
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1004","0","REG_DWORD"	'下载未签名的ActiveX
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1200","0","REG_DWORD"	'运行 ActiveX 控件和插件
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1201","0","REG_DWORD"	'对未标记为可安全执行脚本的 ActiveX 控件执行脚本
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1405","0","REG_DWORD"	'对标记为可安全执行脚本的 ActiveX 控件执行脚本
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1400","0","REG_DWORD"	'活动脚本
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2201","0","REG_DWORD"	'ActiveX 控件自动提示
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1803","0","REG_DWORD"	'文件下载
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2200","0","REG_DWORD"	'文件下载自动提示

 WshShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow\*.docoa.com.cn",0,"REG_BINARY"	'允许弹出窗口
 WshShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation\AllSitesCompatibilityMode",1,"REG_DWORD"	'IE8 允许兼容性视图设置

 WScript.echo "成功将DocOA稿件处理系统的网址" & url &"加入了您的可信站点，并重新设置了可信站点的安全性。"&vbcrlf&"请关闭所有IE窗口再重新打开，设置才会生效。"
 set WshShell=nothing
end sub

