Re: Run a local install Application from JS!?



"Adrian" <Adrian@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:djgpbr$nbe$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi
> I want to be able to start a locally installed application from within
a
> web page.
>
> So if our application is installed it is started when a user clicks a link
> on our page. I know or assume this cannot be done just from JS?
>
> I though I could do it using an OCX active (signed) and then call it from
JS
> using onclick but can't seem to get this to work!
>
> Any ideas of how I can do this or better still any links to a working
> example!


You'll get a security warning but you can do it:


<html>
<head>
<title>run_exe.com/</title>
<script type="text/javascript">
function run(what) {
var wss = new ActiveXObject("WScript.Shell");
wss.Run(what);
}
</script>
</head>
<body>
<form>
<input type="button" value="Notepad" onclick="run('Notepad.exe')">
<input type="button" value="Calculator" onclick="run('Calc.exe')">
</form>
</body>
</html>



.


Loading