Add a Web site to a secure site. Set the security site to prompt when ActiveX is open. Go to the header footer's VBS code _VBS

Source: Internet
Author: User
Copy Code code as follows:

'/*=========================================================================
' * Intro is mainly to solve the problem when using WebBrowser to print, IE security must be set first
' * FileName adds site to secure site. Set the security site to open ActiveX prompt. Go to the header footer. 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")

' Add a site to a secure site
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

' Set alert when security site opens 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"

' Remove header and footer
strKeyPath = "Software\Microsoft\Internet Explorer\pagesetup\"
Objreg.setstringvalue HKEY_CURRENT_USER, strKeyPath, "header", ""
Objreg.setstringvalue HKEY_CURRENT_USER, strKeyPath, "footer", ""

msg = "IE security settings complete" &vbcrlf&vbcrlf
msg = MSG & "If you are not able to print properly, you need to close all open IE browser windows, and then log on to OA for printing" &vbcrlf&vbcrlf
msg = MSG & "If you still have a problem, you can contact the Technical Group: Liu Yong Law"
MsgBox msg, vbinformation, "Warm reminder!" "
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.