function openClientdemo(){
try{
var str="C:\\\Program Files\\\NetAppSoft.exe";
var WSH=new ActiveXObject("Wscript.Shell").run(str);
}
catch(e){
alert("找不到文件"+str+"请确认是否正确安装了软件");
}
}
这样写,后面换成cmd.exe就可以执行,但是是上面的路径就会报错,找不到文件,请高手指点...
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";
newprocess.Start();
Process newprocess = new Process();
newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
newprocess.Start();
Process newprocess = new Process();
newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
newprocess.Start();
newprocess.StartInfo.FileName = "HospitalLeakage.exe";//调用的exe文件
newprocess.Start();
这个是后台的process类吧,没试过这样写的,先试哈可以不
不知道你是做什么用的。建议你赶紧换思路吧。
<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执行
pro.StartInfo.UseShellExecute = true;
pro.StartInfo.CreateNoWindow = false;
pro.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
pro.StartInfo.FileName = "你要执行的文件绝对路径";
pro.Start();才做过 这东西 不过我做的比你复杂