473,416 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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
Jul 23 '05 #1
3 36900
In article <yY******************@twister.rdc-kc.rr.com>, Johnny says...
How do I create a link on a Web page on my hard drive that will run an
executable file on my hard drive?
You can't.

If this is not the appropriate newsgroup for this question,
It probably isn't.

can you
suggest which ones I should try?


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

--
Hywel

http://sponsorhywel.org.uk/
Jul 23 '05 #2
In article <yY******************@twister.rdc-kc.rr.com>, jo******@kc.rr.com
enlightened us with...
How do I create a link on a Web page on my hard drive that will run an
executable file on my hard drive?


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="javascript" type="text/javascript">
var oShell = new ActiveXObject("WScript.Shell");
var prog = "C:\\Program Files\\Microsoft 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.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3
In article <MP************************@news.individual.net> ,
hy**********@hotmail.com enlightened us with...
In article <yY******************@twister.rdc-kc.rr.com>, Johnny says...
How do I create a link on a Web page on my hard drive that will run an
executable file on my hard drive?


You can't.


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!"
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: lamar_air | last post by:
I have a fortran executable which when run from cmd it asks for a series of parameters which you enter then hit enter. From my python cgi script i want to be able to run the executable. Enter the...
7
by: Johnny | last post by:
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...
4
by: Caroline | last post by:
I'd like to launch an executable file from a web page. Basically, the user enters seven parameters and then clicks a button to generate a graph. The input is written to a file and then read by...
6
by: Marlene Arauz Martin | last post by:
Hello, How's everybody??? I have an aspx. page that is calling an executable,....like this... System.Diagnostics.ProcessStartInfo psi= new System.Diagnostics.ProcessStartInfo();...
8
by: suresh_C# | last post by:
Dear All, What is difference between Portable Executable (PE) file and a Assembly? Thanks, Mahesh
3
by: RMurray | last post by:
We have an ASP page that calls an executable to change files from one type to another. We have been running this page for 2 years without any difficulties. We are attempting to switch it to a new...
2
by: Abraham Andres Luna | last post by:
hello everyone, i am having a hard time launching an executable from an aspx page. i have already setup impersonation in the web.config file like so: <?xml version="1.0"?> <configuration...
1
by: wanaruk | last post by:
Hi all. I am working on a legacy application written in Classic ASP with VB6 COM+ components running on Windows 2003 Adv Server (32bit). There is one page in the app that uses Secure FTP to send...
16
by: Pie Squared | last post by:
I'm not completely sure that this is the right place to ask, but I'm doing it in C, so I'm asking, but if I'm wrong, then please don't hesitate to correct me and tell me where to post this. What...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.