Solved

Open .exe from Javascript

Posted on 2003-10-31
10
3,678 Views
Last Modified: 2013-12-16
i have an image that looks like a clock located as a link on my webpage. when you click on it, i want one of my companie's internal programs to open.

the .exe is located on our network drive so i need to put a full path for the .exe location. i'm pretty novice with javascript but i want something like (pseudo-code):

<a href="javascript:program.open('F:\timecard.exe')"><img src="timecard.jpg"></a>

thanks,
jeremy
0
Comment
Question by:Jeremy Daley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 2

Expert Comment

by:proziath
ID: 9659805
The closest I think you can get is something like the following:

<a href="javascript:window.open('F:\\timecard.exe')"><img src="timecard.jpg"></a>

You will get a message warning of the dangers of running a program from a web page. Javascript has a built in security measure to prevent the automatic running of programs without notifying the user first because this could pose a danger when used maliciously.
0
 
LVL 4

Author Comment

by:Jeremy Daley
ID: 9661714
it doesn't exactly have to use the coding <a href...>

if there is any way to do it, i'll use that way...i'm just using an example. if there is some kind of shellexecute code that works with javascript that would be useful too. there's gotta be another way that's not going to bring up that message window...
0
 
LVL 2

Expert Comment

by:ericsDev
ID: 9661894
This may be of interest to you, I'm not sure if it applies, I don't know how your webpage is hosted and stuff like that but here's a link you may want to take a look at:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Expert Comment

by:Deathbob
ID: 9662905
Are you Trying to open it on the server computer or the  visitor comuter?
0
 
LVL 1

Expert Comment

by:Deathbob
ID: 9662923
Opps answerd my own question. I think that you would have to make your own popup window that propmpts you, if they click yes it loads it and if no then it doesnt.

If you want it to load from your server to someone out of the network youll have to use "virtual directory's". But then they will have the option to save or open.
0
 
LVL 4

Author Comment

by:Jeremy Daley
ID: 9663444
here's the complete story....our company is using active desktop on all employee computers to display collector performace (for a debt collection agency) and to have other stuff displayed as well. one problem is, some computers have too many icons on the desktop already that they cover the page. there's ways around this, but we were planning to make icons on the .aspx page that is shown on active desktop. these .exe files exist on a server and they are only used within the agency, so there's no need for security.

it seems like the only way we can do it is by having that frickin' dialog box show up saying "open [] save" ... and i don't want this

deathbob, if you have some code example of how i could just open up an .exe without any prompts, that would be awesome, but i could just use regular html if i wasn't worried about any prompts at all.

help me !!!
:)

thanks again,
jeremy
0
 
LVL 1

Expert Comment

by:Deathbob
ID: 9663745
Little Harder. I was going to say if it was to execute on the server use some CGI, but like that the best i can say is youll have to put up with the window.  This is really gonna bug me now...
0
 
LVL 4

Author Comment

by:Jeremy Daley
ID: 9664045
well, i'm starting to think more and more that it is impossible to open without first getting the prompt. it's most likely an issue with internet explorer that won't let it happen on grounds of security reasons.

it's strange though, because some damn website ad maliciously put an icon on my desktop without me knowing it until i saw it. i was pretty angry and called the company and the guy acted like they never did such a thing.

if you never find the answer, i may just give you the points for persistence...it's appreciated
later,
jeremy
0
 
LVL 1

Accepted Solution

by:
Deathbob earned 25 total points
ID: 9664141
Will do, ya, they alow that but not the execution of a file. Which one is more of a security risk?
0
 
LVL 4

Author Comment

by:Jeremy Daley
ID: 9664206
neither one is really more of a risk, just the fact that anyone could start your programs if they wanted to without YOU wanting to. which i guess is understandable, but in terms of my situation, i wish there was an exeption because an "in-house" application doesn't really have security issues since it's only used by people within the company.

well, i'm suppose to be getting a couple of refunds on some other questions, but i appreciate your interest in helping. thanks,
jeremy
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question