我做了个测试页面,代码如下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
//程序路径
//var pathexe = "\"c:\\Program Files\\Wintone\\SmartMouse\\FullScr32.exe";
//var pathexe = "\"E:\\Foxmail\\Foxmail.exe";
var pathexe = "\"C:\\Windows\\notepad.exe";function exec(command)
{
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1)
{
alert('命令' + window._command + ' 已经被用户禁止!');
return true;
}
else
return false;
};
//-----------
var wsh = new ActiveXObject('WScript.Shell');
if (wsh) wsh.Run(command);
wsh = null;
window.onerror = window.oldOnError;
}//设置程序路径
</script></head><body>
<input type="button" name="but" value="打开程序" onclick="exec(pathexe)"/>
</body>
</html>
当pathexe 指向foxmail之类软件就能正常打开,而指向一个FullScr32.exe软件就弹出错误对话框“初始化核心错误",标题栏是“splitter”。这个程序是一个屏幕手写程序。我安装正常,手动点击运行也正常。请教高手如何解决?十万火急,谢谢!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
//程序路径
//var pathexe = "\"c:\\Program Files\\Wintone\\SmartMouse\\FullScr32.exe";
//var pathexe = "\"E:\\Foxmail\\Foxmail.exe";
var pathexe = "\"C:\\Windows\\notepad.exe";function exec(command)
{
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1)
{
alert('命令' + window._command + ' 已经被用户禁止!');
return true;
}
else
return false;
};
//-----------
var wsh = new ActiveXObject('WScript.Shell');
if (wsh) wsh.Run(command);
wsh = null;
window.onerror = window.oldOnError;
}//设置程序路径
</script></head><body>
<input type="button" name="but" value="打开程序" onclick="exec(pathexe)"/>
</body>
</html>
当pathexe 指向foxmail之类软件就能正常打开,而指向一个FullScr32.exe软件就弹出错误对话框“初始化核心错误",标题栏是“splitter”。这个程序是一个屏幕手写程序。我安装正常,手动点击运行也正常。请教高手如何解决?十万火急,谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货