function openClientdemo(){
  try{
  var str="C:\\\Program Files\\\NetAppSoft.exe";
  var WSH=new ActiveXObject("Wscript.Shell").run(str);
  }
  catch(e){
  alert("找不到文件"+str+"请确认是否正确安装了软件");
  }
  }
这样写,后面换成cmd.exe就可以执行,但是是上面的路径就会报错,找不到文件,请高手指点...  
 
 

解决方案 »

  1.   

    希望对你有用
    Process newprocess = new Process();
                newprocess.StartInfo.FileName = "HospitalLeakage.exe";
                newprocess.Start();
      

  2.   

                希望对你有用
                  Process newprocess = new Process();
                newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
                newprocess.Start();
      

  3.   

        希望对你有用
                  Process newprocess = new Process();
                newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
                newprocess.Start();
      

  4.   

    Process newprocess = new Process();
     newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
    newprocess.Start();
    这个是后台的process类吧,没试过这样写的,先试哈可以不
      

  5.   

    在B/S上调用客户端的EXE程序,这是个危险的动作啊。呵呵
    不知道你是做什么用的。建议你赶紧换思路吧。
      

  6.   

    <head>
    <title>
    测试
    </title><script>
    function openClientdemo(){
      try{
      var str="c:\\\RegexTool.exe";
      var WSH=new ActiveXObject("Wscript.Shell")
      WSH.run(str);
      }
      catch(e){
      alert("找不到文件"+str+"请确认是否正确安装了软件");
      }
      }
    </script>
    </head>
    <body>
    <input type="button" id="btn" value="运行" onclick="openClientdemo()">
    </body>IE7.0测试通过,不过要手动允许ActiveX执行
      

  7.   

                    System.Diagnostics.Process pro = new System.Diagnostics.Process();
                    pro.StartInfo.UseShellExecute = true;
                    pro.StartInfo.CreateNoWindow = false;
                    pro.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
                    pro.StartInfo.FileName = "你要执行的文件绝对路径";
                    pro.Start();才做过  这东西  不过我做的比你复杂
      

  8.   

    用Wscript.Shell这个可以实现的,不过要允许Active执行,每个使用者都需要修改IE配置,安全行不好
      

  9.   

    8楼高手哇,在后台用process类?没搞过啊,学习哈