JavaScript修改IE注册表
http://www.cnblogs.com/zmc/p/3373812.html
<script type="text/javascript"> var obj = new ActiveXObject("WScript.shell"); var MachinePath = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones"; var UserPath = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones"; var str; str = MachinePath + "\\3\\1001"; if(obj.RegRead(str) != '1'){ obj.RegWrite(str, 0x00000001, "REG_DWORD"); } str = UserPath + "\\3\\1001"; if(obj.RegRead(str) != '1'){ obj.RegWrite(str, 0x00000001, "REG_DWORD"); } str = MachinePath + "\\3\\1004"; if(obj.RegRead(str) != '1'){ obj.RegWrite(str, 0x00000001, "REG_DWORD"); } str = UserPath + "\\3\\1004"; if(obj.RegRead(str) != '1'){ obj.RegWrite(str, 0x00000001, "REG_DWORD"); } str = MachinePath + "\\3\\1200"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\3\\1200"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\3\\1201"; if(obj.RegRead(str) != '1'){ obj.RegWrite(str, 0x00000001, "REG_DWORD"); } str = UserPath + "\\3\\1201"; if(obj.RegRead(str) != '1'){ obj.RegWrite(str, 0x00000001, "REG_DWORD"); } str = MachinePath + "\\3\\1405"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\3\\1405"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\3\\2201"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\3\\2201"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\1001"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\1001"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\1004"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\1004"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\1200"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\1200"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\1201"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\1201"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\1405"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\1405"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\2201"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\2201"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = MachinePath + "\\2\\1402"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } str = UserPath + "\\2\\1402"; if(obj.RegRead(str) != '0'){ obj.RegWrite(str, 0x00000000, "REG_DWORD"); } </script>
注意:IE11上不起作用!
从 IE11 开始,navigator 对象支持 plugins 和 mimeTypes 属性。 此外,window.ActiveXObject 属性从 DOM 中隐藏。 (这意味着你不能再使用该属性检测 IE11。)
希望大家能把自己的所学和他人一起分享,不要去鄙视别人索取时的贪婪,因为最应该被鄙视的是不肯分享时的吝啬。