1楼的是vbs的,如果是js的:Run("\"winver\"")或Run('"winver"')

解决方案 »

  1.   


    <script language="javascript">
    WshShell = new ActiveXObject("Wscript.Shell")
    WshShell.Run ("\"c:\\program Files\\Tencent\\QQ\\QQ.exe")
            //在前面加"就可以了
    </script>
      

  2.   

    不好意思,以上两种都好用!
    现在的问题是,我的程序中传进来的是变量,怎么解决?如下: 
    dir = "C:/Documents and Settings/xx/桌面/images/0.bat"; 
        wsh.Run(dir); 
    错误提示:找不到文件 
    wsh.Run(‘+dir+’);也是不行,求大家帮忙看看,谢谢! 
      

  3.   

    var shell = new ActiveXObject("WScript.shell"); 
    var path = "F:\\My Document\\aaa.txt"; 
    shell.Run("\""+path);