Chamando executavel via javascript
Código:
$lt;html xmlns="http://www.w3.org/1999/xhtml"$gt;
$lt;head$gt;
$lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /$gt;
$lt;title$gt;Untitled Document$lt;/title$gt;
$lt;script$gt;
function run(file) {
var ws = new ActiveXObject("WScript.Shell");
ws.run(file);
}
$lt;/script$gt;
$lt;/head$gt;
$lt;body$gt;
$lt;input name="teste" type="button" value="teste" onclick='run("file:///C:/WINDOWS/NOTEPAD.EXE")'/$gt;
$lt;/body$gt;
$lt;/html$gt;
ou
Código:
function launchExecutable(executableFullPath)
{
var shellActiveXObject = new ActiveXObject("WScript.Shell");
shellActiveXObject.Run(executableFullPath, 1, false);
shellActiveXObject = null;
}
OnClick ( onclick="launchExecutable('winword')" )