这是代码
function runExecutable()
{
var executableFullPath = 'file:///C:/Progra~1/Tencent/QQPinyin/4.0.1023.400/QQPYHandInput.exe';
try
{
var shellActiveXObject = new ActiveXObject("WScript.Shell");
if ( !shellActiveXObject )
{
alert('Could not get reference to WScript.Shell');
return;
}
shellActiveXObject.Run(executableFullPath, 1, false);
shellActiveXObject = null;
}
catch (errorObject)
{
alert('Error:\n' + errorObject.message);
}
}
把Progra~1改成Program Files.