添加网站到安全站点.设置安全站点打开ActiveX时提示.去页眉页脚的vbs代码
代码如下:
'/*========================================================================= ' * Intro 主要是解决在使用WebBrowser打印时,得先设置IE安全性的问题 ' * FileName 添加网站到安全站点.设置安全站点打开ActiveX时提示.去页眉页脚.vbs ' * Author yongfa365 ' * Version v1.0 ' * Email yongfa365[at]qq.com ' * MadeTime 2009-06-18 23:12:55 ' * LastModify 2009-06-18 23:12:55 ' *==========================================================================*/ Const HKEY_CURRENT_USER = &H80000001 Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") '添加网站到安全站点 strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\yongfa365.com" objReg.CreateKey HKEY_CURRENT_USER, strKeyPath objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, "http", 2 '设置安全站点打开ActiveX时提示 strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, "CurrentLevel", "00000000" objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, "1201", "00000001" '取消页眉页脚 strKeyPath = "Software\Microsoft\Internet Explorer\PageSetup\" objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, "header", "" objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, "footer", "" msg = "IE安全设置完成"&vbCrLf&vbCrLf msg = msg & "如果还不能正常打印,你需要关闭所有打开的IE浏览器窗口,然后再登录OA进行打印"&vbCrLf&vbCrLf msg = msg & "如果还是有问题,您可以联系技术组:柳永法 " MsgBox msg, vbInformation, "温馨提醒!"
相关推荐
cbqstars 2020-08-16
未来战士 2019-12-08
架构技术交流 2019-12-17
laohyx 2019-10-23
airfling 2019-11-25
大尉 2009-01-05
weiloser 2008-08-16
wesai 2019-09-05
bentengdi 2008-06-23
SometimesYmc 2008-06-20
xsjezp 2008-06-20
HTMLzuo 2019-09-05
86560895 2007-03-27
diediexiaomi 2007-03-25
潇汀 2007-03-07
以梦为马不负韶华 2007-03-07