//////////////////////////////////////// ////////////////////////////////
//
// Add the information site and the specified IP address to the Local intranet,
// "*" = DWORD: 00000002 indicates a trusted site area
// "*" = DWORD: 00000001 indicates the Local intranet Region
//
//////////////////////////////////////// ////////////////////////////////
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 on the webpage, add a trusted site, and disable the pop-up window blocking program
//
//////////////////////////////////////// /////////////////////////////////////
Registry entry of the trusted site
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ zonemap \ ranges \ range [*]
ActiveX registry key
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ [0-4] \ [*]
[0-4]
Value settings
------------------------------
0 my computer
1. Local intranet Region
2. trusted site regions
3. Internet region
4 restricted site regions
[*]
1001 download the signed ActiveX Control
1004 download unsigned ActiveX Controls
1200 Run ActiveX controls and plug-ins
1201 initialize ActiveX controls that are not marked as secure and run scripts
1405 execute scripts on ActiveX controls marked as secure Script Execution
2201 ActiveX control automatic prompt **
The Registry Key of the blocked program appears.
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 a trusted site IP Address
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 the xinxp pop-up window blocking program
Wshshell. regwrite ("hkcu \ Software \ Microsoft \ Internet Explorer \ new Windows \ popupmgr", "no ");
Alert ("Active Control Security Settings, pop-up window settings, successful site Settings ");
// -->
</SCRIPT>
URL:
For example, we want to add www.microsoft.com to a trusted site of the customer.
1. Run regedit to 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 named "Microsoft.com" under it"
3. Create another item under Microsoft.com and name it "www"
4. A two-byte sub-key with the new key at www, named "*", "*" indicates any protocol, you can also
"*" Is replaced with "HTTP", "ftp", and other names.
5. Double-click the newly created double-byte sub-key "*" to ensure that the base value is "hexadecimal ".
Data Type: "2"
6. Disable 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 ("successfully written ");
// -->
</SCRIPT>
Appendix VB. NET code
Restore
Dim Reg as registrykey
Reg = registry. currentuser
'0: My computer ()
'1 Local intranet Region
'2: trusted site region ()
'3: Internet (region)
'4: restricted site area ()
Reg = reg. opensubkey ("SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2", true)
'2017 download the signed ActiveX Control
Reg. setvalue ("1001", "1 ")
'2017 download unsigned ActiveX Control
Reg. setvalues ("1004", "3 ")
'2017 Run ActiveX controls and plug-ins
Reg. setvalue ("1200", "0 ")
'123' initializes and runs scripts on ActiveX controls that are not marked as secure.
Reg. setvalues ("1201", "3 ")
'123' execute scripts on ActiveX controls marked as secure Script Execution
Reg. setvalue ("1405", "0 ")
'2010 ActiveX control automatic prompt **
Reg. setvalues ("2201", "3 ")
Reg = reg. opensubkey ("SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 3", true)
'2017 download the signed ActiveX Control
Reg. setvalue ("1001", "1 ")
'2017 download unsigned ActiveX Control
Reg. setvalues ("1004", "3 ")
'2017 Run ActiveX controls and plug-ins
Reg. setvalue ("1200", "0 ")
'123' initializes and runs scripts on ActiveX controls that are not marked as secure.
Reg. setvalues ("1201", "3 ")
'123' execute scripts on ActiveX controls marked as secure Script Execution
Reg. setvalue ("1405", "0 ")
'2010 ActiveX control automatic prompt **
Reg. setvalues ("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 Region
'2: trusted site region ()
'3: Internet (region)
'4: restricted site area ()
Reg = reg. opensubkey ("SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2", true)
'2017 download the signed ActiveX Control
Reg. setvalue ("1001", "0 ")
'2017 download unsigned ActiveX Control
Reg. setvalue ("1004", "0 ")
'2017 Run ActiveX controls and plug-ins
Reg. setvalue ("1200", "0 ")
'123' initializes and runs scripts on ActiveX controls that are not marked as secure.
Reg. setvalue ("1201", "0 ")
'123' execute scripts on ActiveX controls marked as secure Script Execution
Reg. setvalue ("1405", "0 ")
'2010 ActiveX control automatic prompt **
Reg. setvalue ("2201", "0 ")
Reg = reg. opensubkey ("SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 3", true)
'2017 download the signed ActiveX Control
Reg. setvalue ("1001", "0 ")
'2017 download unsigned ActiveX Control
Reg. setvalue ("1004", "0 ")
'2017 Run ActiveX controls and plug-ins
Reg. setvalue ("1200", "0 ")
'123' initializes and runs scripts on ActiveX controls that are not marked as secure.
Reg. setvalue ("1201", "0 ")
'123' execute scripts on ActiveX controls marked as secure Script Execution
Reg. setvalue ("1405", "0 ")
'2010 ActiveX control automatic prompt **
Reg. setvalue ("2201", "0 ")