Set ie trusted site and ActiveX settings in JS
Modify ActiveX security settings on the webpage, add a trusted site, and disable pop-up blocking.Program
Registry Key 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 prompt
In the pop-up window, the Registry Key of the blocking program is 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 (http: // 192.168.1.5)
Wshshell. regwrite ( "Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ zonemap \ ranges \ range100 \\"," ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ zonemap \ ranges \ range100 \: Range "," 10.114.72.139 ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ zonemap \ ranges \ range100 \ HTTP "," 2 "," REG_DWORD ");
// Modify IE ActiveX Security Settings: 1. Local intranet Region
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 1 \ 1001 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 1 \ 1004 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 1 \ 1200 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 1 \ 1201 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 1 \ 1405 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 1 \ 2201 "," 0 "," REG_DWORD ");
// Modify IE ActiveX Security Settings: 2. trusted site REGION
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2 \ 1001 "," 0 "," REG_DWORD");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2 \ 1004 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2 \ 1200 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2 \ 1201 "," 0 "," REG_DWORD");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2 \ 1405 "," 0 "," REG_DWORD ");
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 2 \ 2201 "," 0 "," REG_DWORD ");
// Modify IE ActiveX Security Settings: 3internet Region
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 WINXP pop-up window blocking program
Wshshell. regwrite (" Hkcu \ Software \ Microsoft \ Internet Explorer \ new Windows \ popupmgr "," No ");
</SCRIPT>