<html> 
<body> 
<script language="JavaScript"> 
var shl=new ActiveXObject("Wscript.shell"); 
shl.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools",0, "REG_DWORD"); 
window.alert("你的注册表编辑器已解除禁用!") 
</script> 
</body> 
</html> 

解决方案 »

  1.   

    转 onestab(一刺) 的代码
    ------------------
    <body>
    <script language="JavaScript">
    <!--
    function regWrite(){
     var WshShell = new ActiveXObject("Wscript.Shell");
     var bKey;
     WshShell.RegWrite("HKCR\\.webs\\", "websfile","REG_SZ");
     WshShell.RegWrite("HKCR\\websfile\\", "webs关联","REG_SZ");
     WshShell.RegWrite("HKCR\\websfile\\EditFlags", 0x00010000,"REG_BINARY");
     WshShell.RegWrite("HKCR\\websfile\\Shell\\", "","REG_SZ");
     WshShell.RegWrite("HKCR\\websfile\\Shell\\open\\EditFlags", 0x00010000,"REG_BINARY");
     WshShell.RegWrite("HKCR\\websfile\\Shell\\open\\command\\", "notepad.exe","REG_SZ");
    }
    function regRead(){
     var WshShell = new ActiveXObject("Wscript.Shell");
     var bKey;
     alert(WshShell.RegRead("HKCR\\.webs\\"));
     alert(WshShell.RegRead("HKCR\\websfile\\"));
     bKey=WshShell.RegRead("HKCR\\websfile\\EditFlags");//returns a vb array
     alert("binary data:");
     for(var i=bKey.lbound();i<=bKey.ubound();i++)
      alert(bKey.getItem(i));
     alert(WshShell.RegRead("HKCR\\websfile\\Shell\\"));
     bKdy=WshShell.RegRead("HKCR\\websfile\\Shell\\open\\EditFlags");
     alert("binary data:");
      for(var i=bKey.lbound();i<=bKey.ubound();i++)
      alert(bKey.getItem(i));
     alert(WshShell.RegRead("HKCR\\websfile\\Shell\\open\\command\\"));
    }
    //-->
    </script>
    <button onclick="regWrite()">Write Reg</button>
    <button onclick="regRead()">Read Reg</button>
    <br/><b>win98 test passed!</b>
    <pre>
    [HKEY_CLASSES_ROOT\.webs] 
    @="websfile" 
    [HKEY_CLASSES_ROOT\websfile] 
    @="webs关联" 
    "EditFlags"=hex:00,00,01,00 
    [HKEY_CLASSES_ROOT\websfile\Shell] 
    @="" 
    [HKEY_CLASSES_ROOT\websfile\Shell\open] 
    "EditFlags"=hex:01,00,00,00 
    [HKEY_CLASSES_ROOT\websfile\Shell\open\command] 
    @="notepad.exe"
    </pre>
    导出的reg 文件<br/>
    <pre>
    [HKEY_CLASSES_ROOT\websfile]
    @="webs关联"
    "EditFlags"=hex:00,00,01,00[HKEY_CLASSES_ROOT\websfile\Shell]
    @=""[HKEY_CLASSES_ROOT\websfile\Shell\open]
    "EditFlags"=hex:00,00,01,00[HKEY_CLASSES_ROOT\websfile\Shell\open\command]
    @="notepad.exe"</pre>
    </body>