Solved

Open .exe from Javascript

Posted on 2003-10-31
10
3,642 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now