苏泊尔压力锅哪款好:屏蔽信任站点activex提示

来源:百度文库 编辑:九乡新闻网 时间:2024/04/28 03:47:17

ON ERROR RESUME NEXT
'//仅需设置以下两个参数
Const strServerIP ="192.168.1.206" 'Web服务器IP
Const strServerName ="localhost"     'Web服务器机器名


SetTrustedSites()

if Err.number = 0 then
    Wscript.echo "恭喜您,设置成功!"
else
    Wscript.echo "对不起,设置失败!" & Err.Description
    Err.Clear
end if

'创建业务系统桌面快捷图标
Function CreateShortCut()
    set WshShell = WScript.CreateObject("WScript.Shell")
    strDesktop = WshShell.SpecialFolders("Desktop")
    set oShellLink = WshShell.CreateShortcut(strDesktop & "\\杰思科地籍管理信息系统.lnk")
    oShellLink.TargetPath = "http://"&strServerIP&"/OA"
    oShellLink.WindowStyle = 1 '参数1默认窗口激活,参数3最大化激活,参数7最小化
    oShellLink.Hotkey = "CTRL+SHIFT+F"
    'oShellLink.IconLocation = WshShell.CurrentDirectory & "\\gisquest.ico"
    'Wscript.echo WshShell.ExpandEnvironmentStrings("%WinDir%")'获取win文件夹路径
    oShellLink.IconLocation = "C:\Program Files\Internet Explorer\iexplore.exe, 0"
    oShellLink.Description = "杰思科地籍管理信息系统"
    oShellLink.WorkingDirectory = strDesktop
    oShellLink.Save
End Function

'添加受信任站点及启用ACTIVE设置
Function SetTrustedSites()
    Dim WshShell
    Set WshShell = CreateObject("WScript.Shell")
    '添加受信任站点
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100\",""
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100\http","2","REG_DWORD"
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100\:Range",strServerIP
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101\",""
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101\http","2","REG_DWORD"
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101\:Range",strServerName

    '设置受信任站点的ACTIVE设置
    '运行已用 Authenticode 签名的的组件
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2001","0","REG_DWORD"
    '运行未用 Authenticode 签名的的组件
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2004","0","REG_DWORD"
    '对标记为可安全执行脚本的 ActiveX 控件执行脚本
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1405","0","REG_DWORD"
    '对没有标记为安全的 ActiveX 控件进行初始化和脚本运行
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1201","0","REG_DWORD"
    '二进制和脚本行为
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2000","0","REG_DWORD"
    '下载已签名的 ActiveX 控件
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1001","0","REG_DWORD"
    '下载未签名的 ActiveX 控件
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1004","0","REG_DWORD"
    '运行 ActiveX 控件和插件
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1200","0","REG_DWORD"

    'Java 小程序脚本
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1402","0","REG_DWORD"
    '活动脚本
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1400","0","REG_DWORD"

    'ActiveX 控件自动提示 **
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2201","0","REG_DWORD"
   
    '信任站点 禁用弹出窗口阻止程序
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1809","3","REG_DWORD"
    '对于每个区域下的 1809,数据值 3 表示禁用弹出窗口阻止程序。数据值 0 表示启用弹出窗口阻止程序。
    'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
    '禁用winxp弹出窗口阻止程序
    'WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows\PopupMgr","no" 'HKCU
   
    '信任站点 允许脚本初始化窗口,不受大小和位置限制
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2102","0","REG_DWORD"
   
    '信任站点 允许打开没有地址和状态栏的窗口
    WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\2104","0","REG_DWORD"
End Function