Run a local install Application from JS!?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adrian

    #1

    Run a local install Application from JS!?

    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!


  • McKirahan

    #2
    Re: Run a local install Application from JS!?

    "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
    news:djgpbr$nbe $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
    > Hi
    > I want to be able to start a locally installed application from within[/color]
    a[color=blue]
    > 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[/color]
    JS[color=blue]
    > 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![/color]


    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('N otepad.exe')">
    <input type="button" value="Calculat or" onclick="run('C alc.exe')">
    </form>
    </body>
    </html>



    Comment

    • Adrian

      #3
      Re: Run a local install Application from JS!?

      Great Thanks for your help.

      I though I would need an ActiveX but this is good.

      Is there any way around the warning?

      What if on the first visit to the site it prompts them to add it to their
      trusted sites, would this work?

      If so could it be done from script?

      Thanks

      Again

      "McKirahan" <News@McKirahan .com> wrote in message
      news:l-adneyBctByZsbeR Vn-vA@comcast.com. ..[color=blue]
      > "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
      > news:djgpbr$nbe $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=green]
      >> Hi
      >> I want to be able to start a locally installed application from
      >> within[/color]
      > a[color=green]
      >> 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[/color]
      > JS[color=green]
      >> 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![/color]
      >
      >
      > 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('N otepad.exe')">
      > <input type="button" value="Calculat or" onclick="run('C alc.exe')">
      > </form>
      > </body>
      > </html>
      >
      >
      >[/color]


      Comment

      • McKirahan

        #4
        Re: Run a local install Application from JS!?

        "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
        news:djh1vf$g7c $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
        > Great Thanks for your help.
        >
        > I though I would need an ActiveX but this is good.
        >
        > Is there any way around the warning?
        >
        > What if on the first visit to the site it prompts them to add it to their
        > trusted sites, would this work?
        >
        > If so could it be done from script?
        >
        > Thanks
        >
        > Again[/color]



        "No, there's no way to hide that message, if that message wasn't there
        anyone could come along and delete c:/windows, not good at all."

        Try running it as an HTA; hust rename it with an .hta extension.


        Comment

        • Adrian

          #5
          Re: Run a local install Application from JS!?

          OK Thanks for your help

          "McKirahan" <News@McKirahan .com> wrote in message
          news:AcWdnVimZ4 aigcHenZ2dnUVZ_ sydnZ2d@comcast .com...[color=blue]
          > "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
          > news:djh1vf$g7c $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=green]
          >> Great Thanks for your help.
          >>
          >> I though I would need an ActiveX but this is good.
          >>
          >> Is there any way around the warning?
          >>
          >> What if on the first visit to the site it prompts them to add it to their
          >> trusted sites, would this work?
          >>
          >> If so could it be done from script?
          >>
          >> Thanks
          >>
          >> Again[/color]
          >
          > http://wd.iworld.com/forum/showthrea...threadid=51038
          >
          > "No, there's no way to hide that message, if that message wasn't there
          > anyone could come along and delete c:/windows, not good at all."
          >
          > Try running it as an HTA; hust rename it with an .hta extension.
          >
          >[/color]


          Comment

          • Jean-Philippe Encausse

            #6
            Re: Run a local install Application from JS!?

            What is browser compatibility of this solution ?
            -> Firefox, IE, Opera ?
            -> only under Windows i presume ?

            Comment

            Working...