<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>js</title>
<SCRIPT language=JavaScript>
function Run(strPath)
{
try
{
var objShell = new ActiveXObject("wscript.shell");
objShell.Run(strPath);
objShell = null;
}
catch(e)
{
alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确.')
}
}
</SCRIPT>
</head>
<body>
<a href="#" οnclick="Run('file:///C:/Program%20Files/Tencent/RTXC/RTX.exe')">打开RTX</a>
<a href="#" οnclick="Run('file:///D:/Program%20Files/Tencent/QQ/QQProtect/Bin/QQProtect.exe')">打开QQ</a>
<br/>
</body>
</html>
js调用本地exe
最新推荐文章于 2023-12-29 11:59:26 发布