function exec () { var command; var shell = new ActiveXObject("WScript.Shell"); try { command = shell.RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Directory\\shell\\RadiAnt\\Icon"); } catch(e) { if(window.confirm("你可能还没有安装Radiant,请下载安装")){ //alert("确定"); window.location.href="jspView/radiantsetup32312921.exe"; return false; }else{ return false; } }//执行exe程序 window.oldOnError = window.onerror; window._command = command; window.onerror = function (err) { if (err.indexOf('utomation') != -1) { alert('命令' + window._command + ' 已经被用户禁止!'); return true; } else return false; }; var wsh = new ActiveXObject('WScript.Shell'); if (wsh) wsh.Run("\""+command); window.onerror = window.oldOnError; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)