How to run an executable from a Web page

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

    #1

    How to run an executable from a Web page

    How do I create a link on a Web page on my hard drive that will run an
    executable file on my hard drive?

    For example, let's say I create runpoodle.htm and save it to my hard
    drive, and let's also say I have an executable file on the root of C
    named c:\poodle.exe.

    How can I create a link of some sort on runpoodle.htm that will run
    poodle.exe on c:\ ?

    Better yet, can I specify a data file that poodle.exe will open after it
    starts?

    I use Windows XP Pro, and when I create a simple href anything like this

    <a href="file:\\c: \poodle.exe"> Run POODLE.EXE</a>

    the result is that Windows opens a security warning box asking whether I
    want to download poodle.exe.

    If you need any other information, please let me know.

    If this is not the appropriate newsgroup for this question, can you
    suggest which ones I should try?

    Thanks.

    --Johnny
    johnnyg aattssiiggnn kc.rr.com


  • Hywel

    #2
    Re: How to run an executable from a Web page

    In article <yYbbd.11845$PH 6.4721@twister. rdc-kc.rr.com>, Johnny says...[color=blue]
    > How do I create a link on a Web page on my hard drive that will run an
    > executable file on my hard drive?[/color]

    You can't.

    [color=blue]
    > If this is not the appropriate newsgroup for this question,[/color]

    It probably isn't.

    [color=blue]
    > can you
    > suggest which ones I should try?[/color]

    I doubt there are any. Think about this:
    <a href="file://c/windows/system32/format c:">Home</a>

    --
    Hywel


    Comment

    • kaeli

      #3
      Re: How to run an executable from a Web page

      In article <yYbbd.11845$PH 6.4721@twister. rdc-kc.rr.com>, johnnnyg@kc.rr. com
      enlightened us with...[color=blue]
      > How do I create a link on a Web page on my hard drive that will run an
      > executable file on my hard drive?
      >[/color]

      Make an HTA.
      (hypertext application)
      Use the windows shell object to open anything you want and pass any params
      you want.
      Most examples on the net are in VBScript/WSH (windows script host). You can
      use JScript or javascript if you want, but the examples are fewer and further
      between.

      HTAs are not subject to the restrictions of regular internet .html files.
      They don't run in the internet security zone.

      An HTA can be complicated, or it can just look like any other HTML file, but
      with a .hta extension.

      Here's a really simple one I had laying around from playing. It just opens
      Excel.

      testExcel.hta
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
      <HTML>
      <HEAD>
      <TITLE>Run Executable HTA</TITLE>
      </HEAD>
      <body bgcolor=#565656 >
      <script language="javas cript" type="text/javascript">
      var oShell = new ActiveXObject(" WScript.Shell") ;
      var prog = "C:\\Progra m Files\\Microsof t Office\\Office\ \Excel.exe";
      oShell.run ('"'+prog+'"',1 );
      window.close();
      </script>
      </BODY>
      </HTML>

      --
      --
      ~kaeli~
      Synonym: the word you use in place of a word you can't
      spell.



      Comment

      • kaeli

        #4
        Re: How to run an executable from a Web page

        In article <MPG.1bd7821196 156f24989905@ne ws.individual.n et>,
        hyweljenkins@ho tmail.com enlightened us with...[color=blue]
        > In article <yYbbd.11845$PH 6.4721@twister. rdc-kc.rr.com>, Johnny says...[color=green]
        > > How do I create a link on a Web page on my hard drive that will run an
        > > executable file on my hard drive?[/color]
        >
        > You can't.
        >[/color]

        Sure you can.
        There are a f-load of caveats about it, though.

        The OP was talking about a page on his own computer to run a program resident
        on his own computer. That's easy to do. See my post.
        It is, however, not at all recommended for general internet use, nor is it
        cross-browser or cross-platform.

        --
        --
        ~kaeli~
        Never say, "Oops!"; always say, "Ah, interesting!"



        Comment

        Working...