are you sure "错误:找不到指定的程序" is caused  by this line or the run() method? if it is the latter, make sure the path is correctare you running it on the client side? lower the ActiveX security settings

解决方案 »

  1.   

    要注意几点:
    1.run不支持长文件名
    2.还有\在js中要写成\\
      

  2.   

    我已经将ActiveX security 降到最低。
    有一段代码
    直接在资源管理器用IE打开,没错,弹出记事本窗口
    但在IIS中运行就出错,错误:你没有权限
    <html>
    <script language="javascript">
    <!--
    function RunCmd()
    {
      var shl=new ActiveXObject("Shell.Application");
      //shl.Run("notepad.exe");
    shl.ShellExecute("notepad.exe");
    }
    //-->
    </script>
    <body onload="RunCmd();">
    </body>
    </html>
      

  3.   

    enable the ActiveX security setttings for the zone where your IIS is in, "Initialize and script ActiveX controls not ed as safe" in particularfor example, if the IIS is on your machine, change the settings for Local Intranet. If the IIS is on the internet, change the settings for Internet
      

  4.   

    saucer:
    I did as you said above! 
    In my owen computer(IE6.0) ,error:
    but in other computer at the Intranet(IE6.0) ,succeed!
      

  5.   

    the error is:"错误:没有权限
      

  6.   

    I make a mistake when I set  ActiveX security!
    Thank You a Lot!
      

  7.   

    But when I use 
    var wsh=new ActiveXObject("WScript.shell");
    error:错误:Automation 服务器不能创建对象
      

  8.   

    change the security settings for that zone or add the site to your Trusted Sites in Tools->Internet Options->Security