running .Exe from html

G

Guest

I am attempting to run a .exe from a html link. When I do this of course I get the download dialog box, which I do not want I just want it to execute. So I then tried the script located at the end of this message. This works but I have on problem I am going to deploy this web page on a cd (.exe will also reside on the cd) and depending on the system the drive letter changes. So my question is how can I run a .exe from an html page or script without specifying the drive letter. I want to execute the .exe by locating of the .exe relative to the html page, simalar to loading images in html

Thanks in advance
Ro

<html><Head><script language = "vbscript"
Sub Router(
set WsShell = createobject("wscript.shell"
set wsx = WsShell.exec("[drive letter]:\<folder name>\*.exe"
End Su
</script></head><body><form><input type="Button" value="Click Here" onclick="Router()"></form></body></html>
 
S

Steve Easton

1. I believe you'll find that you don't need
to specify the drive letter. If you call the
windows scripting host from the CD , you've then
activated WSH in the "domain" that contains the
executable. Therefore the executable should run.
( just like calling shellexec in an autorun.inf file )
2. Be advised that a lot of people have disabled
Windows scripting for security purposes.

--
95isalive
This site is best viewed..................
...............................with a computer

Ron said:
I am attempting to run a .exe from a html link. When I do this of course
I get the download dialog box, which I do not want I just want it to
execute. So I then tried the script located at the end of this message.
This works but I have on problem I am going to deploy this web page on a cd
(.exe will also reside on the cd) and depending on the system the drive
letter changes. So my question is how can I run a .exe from an html page or
script without specifying the drive letter. I want to execute the .exe by
locating of the .exe relative to the html page, simalar to loading images in
html?
Thanks in advance,
Ron

<html><Head><script language = "vbscript">
Sub Router()
set WsShell = createobject("wscript.shell")
set wsx = WsShell.exec("[drive letter]:\<folder name>\*.exe")
End Sub
</script></head><body><form><input type="Button" value="Click Here"
onclick="Router()"></form></body></html>
 
G

Guest

I'll try it from the cd. I realize the security issues I will face but those are easily explained to those how need to know

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top