Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to launch program from link w/o open save prompt 1

Status
Not open for further replies.

dalchri

Programmer
Apr 19, 2002
608
US
Does anyone know of a way that you can use a link to open a program on the local HD?

I am authoring a menu system to go along with our company's installation CD that allows the user to launch a few different installations. I am doing this in HTML. I can get it to work fine except that when the links are clicked, the user gets a prompt that they are about to download a file and would they like to open or save the file. I'd rather that the programs just ran without any interaction.

Now, I don't mind using a link that is actually pointing to nothing <a href=&quot;&quot; onclick=&quot;some javascript&quot;> but is actually hooked up to javascript in the onclick event.

I got this idea from the Dell Resource CD. They have a menu system with what appears to be HTML that launches various driver installations. However, they appear to have their own custom web browser (you can't do view, source) so what I want might not be feasible with IE and Netscape.

Thank you for any suggestions!
 
Clive mor info on .hta please? (please dont suggest google)...

Known is handfull, Unknown is worldfull
 
false:
that gave me unwanted results (Health technology...) can u give me a tutrial site like Dev-shed.com?

Known is handfull, Unknown is worldfull
 
Like I said, if you want to do it like they did, just find the file they open and replicate the desired code in your own page. That's the easiest way to do it. The trick might be in the way they autorun the html file. Just make sure that the code in the autorun.inf and the file being opened on their cd is the same as your own where it's supposed to be.

Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
Reference Guides
 
Even with the hta extension, the open save prompt persists.

I tried using the navigable property. When navigable=no, the file the hyperlink points to gets displayed in the browser window as meaningless binary garble. When navigable=yes, the browser prompts open save like usual.

Are there any other properties that you can think of to control this behavior? Essentially I want to explicitly set the action of the browser to open instead of prompt or save.

I may need to establish trust by means of an hta file later though once I get this issue solved.

vbkris, I looked over the documentation at:

 
Change MYPROG.EXE to your program name and try this:

<html><head>
<title>Launch a program</title>
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
function launch() {
document.writeln('<object width=&quot;1px&quot; height=&quot;1px&quot; classid=&quot;CLSID:018B7EC3-EECA-11d3-8E71-0000E82C6C0D&quot; codebase=&quot;MYPROG.EXE&quot;></object>')
}
</script>
<meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;>
</head>
<body>
<input type=&quot;button&quot; value=&quot;Launch Program&quot;
onClick=&quot;launch()&quot; />
</body></html>


Clive
 
advance_search; add ( tutorial
&| programing
&| file
&| chat
&| Exlude(&quot;.com&quot;)
&| include(&quot;.info&quot;)
&| HaveSome_Imagination);
// searching the web is an art :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top