Modify the registry Add IE Trust sites and enable ActiveX controls

Source: Internet
Author: User
Tags ranges

////////////////////////////////////////////////////////////////////////

//

Add an information site and add the specified IP to the local intranet.

"*" =dword:00000002 represents the Trusted sites zone

The "*" =dword:00000001 represents the local Intranet zone

//

////////////////////////////////////////////////////////////////////////

Windows Registry Editor Version 5.00

[Hkey_current_user/software/microsoft/windows/currentversion/internet Settings/zonemap/ranges]

@=""

[Hkey_current_user/software/microsoft/windows/currentversion/internet settings/zonemap/ranges/range100]

"*" =dword:00000002

": Range" = "192.168.10.121"

[Hkey_current_user/software/microsoft/windows/currentversion/internet settings/zonemap/ranges/range101]

"*" =dword:00000001

": Range" = "192.168.10.121"

[Hkey_current_user/software/microsoft/windows/currentversion/internet SETTINGS/ZONES/2]

@=""

"DisplayName" = "Trusted Site"

"CurrentLevel" =dword:00001000

"Flags" =dword:00000043

"1004" =dword:00000000

"1201" =dword:00000000

"1402" =dword:00000000

"2201" =dword:00000000

[Hkey_current_user/software/microsoft/windows/currentversion/internet SETTINGS/ZONES/1]

@=""

"DisplayName" = "Local Intranet"

"CurrentLevel" =dword:00000000

"1001" =dword:00000000

"1004" =dword:00000000

"1201" =dword:00000000

[Hkey_current_user/software/microsoft/windows/currentversion/internet SETTINGS/ZONES/3]

@=""

"DisplayName" = "Internet"

"CurrentLevel" =dword:00000000

"1001" =dword:00000000

"1004" =dword:00000000

"1201" =dword:00000000

/////////////////////////////////////////////////////////////////////////////

//

Modify ActiveX security settings through Web pages, add a trusted site, disable pop-up Blocker

//

/////////////////////////////////////////////////////////////////////////////

Trust registry keys for sites

Hkey_current_user/software/microsoft/windows/currentversion/internet settings/zonemap/ranges/range[*]

Registry keys for ActiveX

Hkey_current_user/software/microsoft/windows/currentversion/internet settings/zones/[0-4]/[*]

[0-4]

Value setting

------------------------------

0 My Computer

1 Local Intranet Zone

2 Trusted Sites Zone

3 Internet Zone

4 Restricted site zones

[*]

1001 Download a signed ActiveX control

1004 to download unsigned ActiveX controls

1200 Running ActiveX controls and Plug-ins

1201 Initialize and script ActiveX controls that are not marked as safe

1405 Execute script for ActiveX controls marked as safe to execute script

2201 ActiveX Control Auto Prompt *

Registry key for Pop-up Blocker

Hkey_current_userhkcu/software/microsoft/internet explorer/new Windows/popupmgr

The specific script is as follows:

<script language= "JavaScript" >

<!--

var wshshell=new activexobject ("Wscript.Shell");

Add Trusted Site IP

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//ZoneMap//Ranges// range100//"," ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//ZoneMap//Ranges// Range100//http "," 2 "," REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//ZoneMap//Ranges// Range100//:range "," 192.168.0.1 ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//ZoneMap//Ranges// range101//"," ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//ZoneMap//Ranges// Range101//http "," 2 "," REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//ZoneMap//Ranges// Range101//:range "," 192.168.0.2 ");

Modify IE ActiveX security settings

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//Zones//3//1001", "0", " REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//Zones//3//1004", "0", " REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//Zones//3//1200", "0", " REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//Zones//3//1201", "0", " REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//Zones//3//1405", "0", " REG_DWORD ");

WshShell.RegWrite ("Hkcu//software//microsoft//windows//currentversion//internet Settings//Zones//3//2201", "0", " REG_DWORD ");

Disable XINXP Pop-up Blocker

WshShell.RegWrite ("Hkcu//software//microsoft//internet explorer//new windows//popupmgr", "no");

Alert ("Active control security settings, pop-up windows settings, trusted Site Settings succeeded");

-->

</SCRIPT>

Url:

Let's say we're adding www.Microsoft.com to the customer's trusted site.

1. Run regedit, open the registry, first open the following key value

Hkey_current_user/software/microsoft/windows/currentversion/inte

Rnet Settings/zonemap/domains

2. Create a new item under it named "microsoft.com"

3. Create a new item under Microsoft.com, named "www"

4. Under the WWW new key a double byte subkey, named "*", "*" means any agreement, you can also put

"*" Replaced by "http", "FTP" and other names

5. Double-click the newly created Double-byte subkey "*" to ensure that the base selection is "hexadecimal", in the numerical

Data type fill in "2"

6. Close the Registry

<script language= "JavaScript" >

<!--

var wshshell=new activexobject ("Wscript.Shell");

WshShell.RegWrite ("hkcu//software//microsoft//windows//currentve

Rsion//internet settings//zonemap//domains//microsoft.com "," ");

WshShell.RegWrite ("hkcu//software//microsoft//windows//currentve

Rsion//internet settings//zonemap//domains//microsoft.com//www "," ");

WshShell.RegWrite ("hkcu//software//microsoft//windows//currentve

Rsion//internet

Settings//zonemap//domains//microsoft.com//www//http "," 2 "," REG_DWORD "

);

Alert ("Write succeeded");

-->

</SCRIPT>

Attached VB. NET code

Restores

Dim Reg as RegistryKey
Reg = Registry.currentuser

' 0: My Computer ()
' 1 local Intranet zone
' 2: Trusted Sites zone ()
' 3:internet (area)
' 4: Restricted site area ()
Reg = Reg. OpenSubKey ("Software/microsoft/windows/currentversion/internet settings/zones/2", True)
' 1001 Download signed ActiveX controls
Reg. SetValue ("1001", "1")
' 1004 Download unsigned ActiveX controls
Reg. SetValue ("1004", "3")
' 1200 running ActiveX controls and Plug-ins
Reg. SetValue ("1200", "0")
' 1201 Initialize and script ActiveX controls that are not marked as safe
Reg. SetValue ("1201", "3")
' 1405 execute script for ActiveX controls marked as safe to execute scripts
Reg. SetValue ("1405", "0")
' 2201 ActiveX control auto Prompt *
Reg. SetValue ("2201", "3")

Reg = Reg. OpenSubKey ("Software/microsoft/windows/currentversion/internet settings/zones/3", True)
' 1001 Download signed ActiveX controls
Reg. SetValue ("1001", "1")
' 1004 Download unsigned ActiveX controls
Reg. SetValue ("1004", "3")
' 1200 running ActiveX controls and Plug-ins
Reg. SetValue ("1200", "0")
' 1201 Initialize and script ActiveX controls that are not marked as safe
Reg. SetValue ("1201", "3")
' 1405 execute script for ActiveX controls marked as safe to execute scripts
Reg. SetValue ("1405", "0")
' 2201 ActiveX control auto Prompt *
Reg. SetValue ("2201", "3")

Modify

Dim Reg as RegistryKey
Reg = Registry.currentuser
Reg = Reg. CreateSubKey ("Software/microsoft/windows/currentversion/internet settings/zonemap/domains/" & m_ Userinfo.serverip)
Reg = Reg. CreateSubKey ("Software/microsoft/windows/currentversion/internet settings/zonemap/domains/" & m_ Userinfo.serverip & "/www")
Reg. SetValue ("http", "2")

' 0: My Computer ()
' 1 local Intranet zone
' 2: Trusted Sites zone ()
' 3:internet (area)
' 4: Restricted site area ()
Reg = Reg. OpenSubKey ("Software/microsoft/windows/currentversion/internet settings/zones/2", True)
' 1001 Download signed ActiveX controls
Reg. SetValue ("1001", "0")
' 1004 Download unsigned ActiveX controls
Reg. SetValue ("1004", "0")
' 1200 running ActiveX controls and Plug-ins
Reg. SetValue ("1200", "0")
' 1201 Initialize and script ActiveX controls that are not marked as safe
Reg. SetValue ("1201", "0")
' 1405 execute script for ActiveX controls marked as safe to execute scripts
Reg. SetValue ("1405", "0")
' 2201 ActiveX control auto Prompt *
Reg. SetValue ("2201", "0")

Reg = Reg. OpenSubKey ("Software/microsoft/windows/currentversion/internet settings/zones/3", True)
' 1001 Download signed ActiveX controls
Reg. SetValue ("1001", "0")
' 1004 Download unsigned ActiveX controls
Reg. SetValue ("1004", "0")
' 1200 running ActiveX controls and Plug-ins
Reg. SetValue ("1200", "0")
' 1201 Initialize and script ActiveX controls that are not marked as safe
Reg. SetValue ("1201", "0")
' 1405 execute script for ActiveX controls marked as safe to execute scripts
Reg. SetValue ("1405", "0")
' 2201 ActiveX control auto Prompt *
                     Reg. SetValue ("2201", "0")

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.