通过网页修改activex安全设置,添加信任站点,禁用弹出窗口阻止程序

 

  
  
  
  
  1. 信任站点的注册表项  
  2.  
  3. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range  
  4.  
  5. ActiveX的注册表项  
  6.  
  7. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\[0-4]\  
  8.  
  9. [0-4]  
  10.  
  11. 值         设置  
  12. ------------------------------  
  13. 0        我的电脑  
  14. 1        本地 Intranet 区域  
  15. 2        受信任的站点区域  
  16. 3        Internet 区域  
  17. 4        受限制的站点区域  
  18.  
  19. 1001     下载已签名的 ActiveX 控件  
  20. 1004     下载未签名的 ActiveX 控件  
  21. 1200     运行 ActiveX 控件和插件  
  22. 1201     对没有标记为安全的 ActiveX 控件进行初始化和脚本运行  
  23. 1405     对标记为可安全执行脚本的 ActiveX 控件执行脚本  
  24. 2201     ActiveX 控件自动提示 **  
  25.  
  26. 弹出窗口阻止程序的注册表项  
  27.  
  28. HKEY_CURRENT_USERHKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMgr  
  29.  
  30. 具体脚本如下:  
  31.  
  32. <SCRIPT LANGUAGE="JavaScript">  
  33. <!--  
  34. var WshShell=new ActiveXObject("WScript.Shell");  
  35. //添加信任站点ip  
  36.  
  37. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range100\\","");  
  38. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range100\\http","2","REG_DWORD");  
  39. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range100\\:Range","192.168.0.1");  
  40. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range101\\","");  
  41. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range101\\http","2","REG_DWORD");  
  42. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range101\\:Range","192.168.0.2");  
  43. //修改IE ActiveX安全设置  
  44.  
  45. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1001","0","REG_DWORD");  
  46. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1004","0","REG_DWORD");  
  47. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1200","0","REG_DWORD");  
  48. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1201","0","REG_DWORD");  
  49. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1405","0","REG_DWORD");  
  50. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\2201","0","REG_DWORD");  
  51. //禁用xinxp弹出窗口阻止程序  
  52.  
  53. WshShell.RegWrite("HKCU\\Software\\Microsoft\\Internet Explorer\\New Windows\\PopupMgr","no");  
  54.  
  55. alert("active控件安全设置,弹出窗口设置,信任站点设置成功");  
  56. //-->  
  57.  
  58. </SCRIPT>  

 

本文出自 “互联网高端架构探索者” 博客,转载请与作者联系!

你可能感兴趣的:(js,职场,休闲,修改activex安全设置,添加信任站点)