Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How JS launch external application (*.exe)?

Status
Not open for further replies.

ahfatt78

Programmer
Oct 8, 2003
5
MY
Initially i use fscommand in Flash to launch application and it need projector file. I 'd force to abandon this way as i wanna use browser-type. Can anyone help in JavaScript to launch external exe file? Thanks.
 
fscommand() is specific to flash only... it's not a javascript command - the only way to do this is with WSHscript that microsoft uses, this stands for windows shell script (WSH) so look that up - when u embed WSHscript or vbscript inside a webpage it will be run as an ActiveX control I'm sure and will require user authentication for the control to run, so users will be prompted by that annoying ActiveX dialog explaining to users the dangers of running your script - Once they grant permission you should be able to run your script that opens an .exe.

Rocco is the BOY!!

SHUT YOUR LIPS...
ROCCOsm.gif
 
i use this code:

<HTML>
<HEAD>

<SCRIPT type=&quot;text/javascript&quot; LANGUAGE=&quot;JavaScript&quot;>

function executeCommands()
{
// Instantiate the Shell object and invoke its execute method.

var oShell = new ActiveXObject(&quot;Shell.Application&quot;);

var commandtoRun = &quot;C:\\fscommand\\wave.exe&quot;;

// Invoke the execute method.
oShell.ShellExecute(commandtoRun, commandParms, &quot;&quot;, &quot;open&quot;, &quot;1&quot;);
}

window.onload=executeCommands;

</SCRIPT>

</HEAD>
<BODY>
</BODY>
</HTML>

but it's still didnt work out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top