• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1466
  • Last Modified:

executing an exe using a href

how do i make an exe run by using anchor tag.
i did this
<a href="c:/folder/somefile.exe">run program</a>
this opens a download box. what should i do for the application to start executing?

0
RTKVSNL
Asked:
RTKVSNL
  • 2
  • 2
  • 2
  • +4
1 Solution
 
dorwardCommented:
http://www.allmyfaqs.com/faq.pl?Launch_executable

Note that the title="virus via foobar" example is sarcasm (its amazing how many people fail to reliase that)
0
 
knightEknightCommented:
dorward ... very entertaining site!

per your example, I tried this link, and it still prompts me:

<a  href="C:\WINDOWS\NOTEPAD.EXE"  title="Notepad"  prompt="no"  security="disable" >Notepad</a>

did I do it wrong or has that problem been fixed in IE6?

what a huge security hole if it actually works that way!  I guess I'm not really too surprised though.
0
 
cocojohnCommented:
Is's (forunately) not possible to launch an application using html anchors. That wouldt be an critical security bug, because you couldt start e.g. "format.com c:" via JavaScript.

Some browsers ask the user to save or to open the file, others simply display the "save as" dialog. Maybe you've seen special HTML viewers on CDs, which open setup files. These viewers are written for that disc and not for the web.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
cocojohnCommented:
dorward,
I'm sure you only have to pay enough $ to MS, and they'll add a line to the next version of IE:
if(url == dorwards_file){lauch_the_file(url);}else{save_the_file(url);}
0
 
dorwardCommented:
knightEknight - I said that example was sarcasm! It doesn't work anywhere!

cocojohn - I'm not the person asking the question.

The only way is either with a browser plugin (the ActiveX example) or by using an insecure system (such as at hta program - which is insecure becuase its trusted).
0
 
knightEknightCommented:
I suspected as much from the security="diable" element, which looked bogus on the face of it ( I KNEW the onclick was bogus) ... but I thought you meant that the virus.exe file was the sarcasm ... not the whole thing.  whew!  
0
 
CarMarCommented:
There are some ebook compilers that produces exe ebooks for windows that allows you to use instructions in a link to run exe files... but those ebooks are also exe files :)
0
 
stebesplaceCommented:
Forget all of the above.

If you want this to semi work, create on your web server a file that would use that application, for example you want notepad. . .well make a blank txt file, and when the user clicks on the link, it will open that .txt file and hence open notepad, but skip the dialog to save or open. Then you could have a word document that is blank to open the program with that document. Know what i mean?

-Steve
0
 
CarMarCommented:
stebesplace: WRONG!!!

If you try to open a .txt file from a web server by using a link, the file will be opened in the browser window!!!


0
 
sosolalaCommented:
there is an other why but very very risky

as some one pointed out you can run format.com /s /q with this!!

what you have to do is create a .cgi file and upload it to you cgi-bin... in which you call the the command you want to execute..

0
 
COBOLdinosaurCommented:
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
COBOLdinosaurCommented:
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
points to dorward

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now