javascript如何调用本地exe程序
//调用本地程序
function runCaptureScreen() {
var executableFullPath = “D://hello.exe”;
try {
var shellActiveXObject = new ActiveXObject("WScript.Shell");
if (!shellActiveXObject) {
alert('WScript.Shell');
return;
}
shellActiveXObject.Run(executableFullPath, 1, false);
shellActiveXObject = null;
}
catch (errorObject) {
}
}
var executableFullPath = “D://hello.exe”;
try {
var shellActiveXObject = new ActiveXObject("WScript.Shell");
if (!shellActiveXObject) {
alert('WScript.Shell');
return;
}
shellActiveXObject.Run(executableFullPath, 1, false);
shellActiveXObject = null;
}
catch (errorObject) {
}
}