js直接调用ActiveX就可以。将以下内容保存到html中,本地直接就可运行。放到服务器上时,在本地要把浏览器级别降低或者将服务器加入到受信任站点中。<SCRIPT   language=JavaScript>   
  function   Run(strPath)   {   
  exe.value=strPath;   
  try   {   
  var   objShell   =   new   ActiveXObject("wscript.shell");   
  objShell.Run(strPath);   
  objShell   =   null;   
  }   
  catch   (e){alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确,而且所需的库文件均可用。')   
    
  }   
  }   
  </SCRIPT>   
    
  请输入要运行的程序:<br><input   name=exe   type=text   size=20   value="regedit"><BUTTON   class=button   onclick="Run(exe.value)">确定</BUTTON><BUTTON   class=button   onclick=exe.value="";>重新输入</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('notepad')">记事本</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('mspaint')">画图板</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('calc')">计算器</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('cmd')">cmd</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('Regedit')">Regedit</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('Msconfig')">Msconfig</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('file:///D:/Program%20Files/Winamp/WINAMP.EXE')">WINAMP</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('IEXPLORE.EXE')">IE</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('..')">..</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('%windir%')">%windir%</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('%temp%')">%temp%</BUTTON><br>   
  <BUTTON   class=button   onclick="Run('file:///D:/Program%20Files/Tencent/qq.EXE')">WINAMP</BUTTON>

解决方案 »

  1.   

    new ActiveXObject("wscript.shell");太危险的,ie都禁止
      

  2.   

    wsh肯定都是被禁止的.太危险的东西.用exec或system函数就可以执行系统命令.
      

  3.   

    Wscript.Shell的确是个双刃剑,我喜欢他,因为他可以做别人想都不敢想的事情,大大提供了效率,很多方面都用得着他,不过他又是黑客喜欢的东西,却是虚拟主机商门谈虎色变的东西,哎,
      

  4.   

    1、使用wsh是可以的,绝无“黑客”之嫌。毕竟是要用户开放权限的
    2、可以书写出不会出现安全提示的代码
    3、用php启动的外部程序只会运行在服务器端,所以只实用于无交互界面的外部程序。
      

  5.   

    new ActiveXObject("wscript.shell");一般都是禁止了的,呵呵!
      

  6.   

    --------------------------------------
    new ActiveXObject("wscript.shell");一般都是禁止了的,呵呵!
    --------------------------------------有警告而已!