472,107 Members | 1,280 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,107 software developers and data experts.

Running 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
http://barelybad.com
Jul 23 '05 #1
7 29228

"Johnny" <jo******@kc.rr.com> wrote in message
news:Bv******************@twister.rdc-kc.rr.com...
How do I create a link on a Web page on my hard drive that will run an
executable file on my hard drive?
In other words, this isn't a question about authoring for the WWW, so
technically it's off-topic. Also I'm curious why you would want to do this,
instead of just having a shortcut on your Windows desktop. Nevertheless:
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?
You can't, to the best of my knowledge.

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>
file:///c:/poodle.exe

Forward slashes, and 3 of them after the colon.

the result is that Windows opens a security warning box asking whether I
want to download poodle.exe.
Whether you are given the opportunity to download only, download or execute,
or execute only is a function of your browser, and can only be configured
there.

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?


One of the Microsoft IE groups, most likely, for questions like this.

Jul 23 '05 #2
In our last episode,
<Bv******************@twister.rdc-kc.rr.com>,
the lovely and talented Johnny
broadcast on comp.infosystems.www.authoring.html:
How do I create a link on a Web page on my hard drive that will run an
executable file on my hard drive?
Evidently, by "Web page" you do not really mean a page on the
World Wide Web. Possibly you mean, an html file on your hard
disk.
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:\ ?
Not in general. Various browsers have various ways of accomplishing
either what you want or something like it. For example lynx has
lynxexec which does what you want, and (not exactly what you are
asking) lynxcgi which allows you to use cgi without running a server.
These capabilities have to be compiled into lynx and enabled in the
lynx configuration file. They are not compiled and enabled by
default because of obvious security concerns. If you ever connect
the machine involved to the internet, be sure you understand the
security issues involved.
Better yet, can I specify a data file that poodle.exe will open
after it starts?
In Netscape and IE and various work-alikes, the way to go about
this is to have a unique data file type and associate it with the
executable. Then link to the data file so the browser will open
that type of file with the executable. For example:

<a href=file://localhost/PATH/data.poo>Work on Poodle Data</a>

The association between *.poo and poodle.exe is set in your browser
configuration (details of how to do that vary slighty by browser).

I'm not sure how to launch poodle.exe without a data file. However,
depending upon the type of executable, you could have a dummy data
file, and when you follow a link to it, the executable is launched
with it. Then you can select other files, depending upon the
executable's capabilities.
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.
You should link to the data file. This won't work if the data files
are a type that the browser opens itself. If you get the download
box, configure your browser's associations so that files of this
type are opened by the executable you want.

In other words you want to define *.poo files as applications/poodle
type, and you want your browser to open *.poo files with poodle.exe.
In Netscape you do this with "Helper Appications" in the Navigator
part of preferences.

There may or may not be devious crude hacks to open executables that
work on kinds of files that the browser normal opens itself, such as
linking to a dummy file of a fictious file type. This will depend
upon the executable and what it does if it is called with a file it
doesn't know how to open.

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?


This isn't really html. A more appropriate place would be in the
group for the particular browser you wish to use. Linking to
data.poo for example can be made to work in a variety of browsers,
but each browser has to be configured to launch poodle.exe when it
encounters *.poo files (or have some proprietary url scheme like
lynxexec).

--
Lars Eighner -finger for geek code- ei*****@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Jul 23 '05 #3
On Wed, 13 Oct 2004 16:14:25 GMT, "Johnny" <jo******@kc.rr.com>
wrote:
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.


If what you want to do is to be "web" based, then you will need
to use the cgi/script functions of the web server you are using
to execute the file on the server machine when the request is
sent to the web server.
Jul 23 '05 #4
On Wed, 13 Oct 2004 16:14:25 GMT, "Johnny" <jo******@kc.rr.com> wrote:
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:\ ?
I'm building a cdrom menu for internal company use only and I've
located a product named Intralaunch which does some of what you want
to do. There are restrictions on how much it can do, fir instance, it
can only be licensed for an Intranet (hence the name) or run from a
disc. But when used from a disc, it must be run from the disc, it
doesn't work from the hard drive.

It uses javascript as it's mechanism. I used to have to provide
instructions to the users to select run instead of download when they
clicked on a link. Now when they click the link, the application
launches without a whimper. It's used to load corporate software from
my disc as well as launching applications like Excel or Powerpoint
using the windows file associations. I'm only using about 3% of it's
capability, but it's made a world of difference for our monthly
builds.
Better yet, can I specify a data file that poodle.exe will open after it
starts?


Intralaunch does have an option to launch a second application, so
maybe that capability can be used for what you have in mind. I haven't
had the need to try that option yet, so I can't tell you a lot about
it.

--
Erik

Jul 23 '05 #5
Johnny wrote:
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.


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

<a href="file:\\c:\scary_virus.exe">Make your computer explode</a>

the result is that Windows opens a security warning box asking whether I
want to download scary_virus.exe.
Jul 23 '05 #6
begin quote from Johnny in <Bv******************@twister.rdc-kc.rr.com>:
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 this scary warning box wasn't there, this would be seen as a *great*
feature by virus and worm authors the world over. So this warning box is
supposed to be scary and something that users can't easily get rid of.

Safe computing practices dictate that users do not run programs of unknown
origin.

--
Shawn K. Quinn
Jul 23 '05 #7
Leif K-Brooks <eu*****@ecritters.biz> wrote in message news:<30*************@uni-berlin.de>...
I use Windows XP Pro, and when I create a simple href anything like this

<a href="file:\\c:\scary_virus.exe">Make your computer explode</a>


If you want your scary virus to be more broadly browser-compatible,
you should use standard syntax instead of proprietary Microsoftisms:

<a href="file:///c:/scary_virus.exe">Make your computer explode</a>

--
Dan
Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Bob Murdoch | last post: by
4 posts views Thread by Stan Sainte-Rose | last post: by
6 posts views Thread by foldface | last post: by
9 posts views Thread by Matt Helm | last post: by
17 posts views Thread by Csaba Gabor | last post: by
4 posts views Thread by somank.sharma | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.