Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Launching a local application using java?

  • 17-09-2008 01:34PM
    #1
    Registered Users, Registered Users 2 Posts: 345 ✭✭


    Hey Guys,

    I got this working a couple of weeks ago and for the love of god I can figure out how to do it again.

    Basically i'm trying to launch a local program from a webpage.
    To make things easy i'll pretend i'm trying to launch notepad (as this is a standalone document).

    The code i have so far is:

    <html>
    <head>
    <title>test</title>
    <script type="text/JScript">
    var v = new ActiveXObject("Shell.Application");
    </script>

    </head>
    <body>
    <p>
    <a href="javascript:v.ShellExecute('notepad', '', 'C:\\system32');">LinkA</a>
    </p>
    <p>
    <a href="javascript:v.ShellExecute('notepad');">LinkB>
    </p>
    <a href="javascript:v.ShellExecute('notepad.exe');">LinkC</a>
    </body>
    </html>


    Any ideas where i'm going wrong?


Comments

  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    It's JavaScript rather than Java. The HTML is poorly formatted but your real problem might be in the security settings on your machine.


Advertisement