Solved

Open .exe from Javascript

Posted on 2003-10-31
10
3,659 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:daleyjem
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:daleyjem
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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:daleyjem
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:daleyjem
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:daleyjem
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

830 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