日期:2014-05-18  浏览次数:20709 次

新手发帖,围观~~急,web页面上调用本地exe程序(比如已安装的程序)[
function openClientdemo(){
  try{
  var str="C:\\\Program Files\\\NetAppSoft.exe";
  var WSH=new ActiveXObject("Wscript.Shell").run(str);
  }
  catch(e){
  alert("找不到文件"+str+"请确认是否正确安装了软件");
  }
  }
这样写,后面换成cmd.exe就可以执行,但是是上面的路径就会报错,找不到文件,请高手指点...  
 
 


------解决方案--------------------
希望对你有用
Process newprocess = new Process();
newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
newprocess.Start();
------解决方案--------------------
在B/S上调用客户端的EXE程序,这是个危险的动作啊。呵呵
不知道你是做什么用的。建议你赶紧换思路吧。
------解决方案--------------------
HTML code
<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>