Forum Moderators: phranque

Message Too Old, No Replies

JavaScript and a normal program?

Opening a program from a web browser

         

digi_mind

4:04 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



Hi. I would like to implement this in my web site:

1. I have a web site. In the web site I have some text that says: "OPEN PAINT".

2. When I press on that botton, then the Paint program should be opened.

NOTE: The paint program is an example I have used, it could be any other program.

Do you know how to make this?

Thank you.

txbakers

4:21 pm on Oct 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure this is entirely possible. You would need to know the path to the various programs on everyone's local computer.

Ans security issues would be horrendous. I wouldn't want a javascript to be able to randomly open an executable on my PC.

Although, microsoft files can be opened in a browser without a problem - word, excel, powerpoint, etc.

GaryK

4:26 pm on Oct 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Isn't this what the HTA [msdn.microsoft.com] tag in IE does?

I agree with txbakers that the security implications are staggering.

TGecho

4:46 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



The hta tag only works if the file is named with an hta extension. Then it's treated like an exe: if you link to it, the browsers asks to download instead of opening it automatically. It's basically a webpage with no security restrictions that uses IE's engine. Even with an hta, I couldn't figure out how to get programs to start, but supposedly it's possible.

So the answer is probably: forget it. :)

digi_mind

7:52 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



I know it is possible. I have seen it working.
I download a program that creates a botton on the explorer bar, and when I pressed on that botton the program starts.

GaryK

8:02 pm on Oct 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let's put it this way. With the proper social engineering and black hat behavior it is possible to use the HTA tag to execute a program on someone's remote computer via a web page. Not to be rude but I consider this such a security risk that I'm not going to detail exactly how to do it. :)

TGecho

8:02 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



>> I download a program

There you go. Sounds like some ActiveX something or other. Can't help you there.

digi_mind

8:08 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



I think I did not explain everything in detail.

1. First of all, by clicking on a link on a web site, I am not planning to open a program in a remote computer. I want to open a program in my own computer.

2. I download a program that creates a botton on the explorer bar. By clicking on the botton a program gets open.

I read something about GUIs to create bottons and other explorer bars.

Anyone has some ideas?

SethCall

6:56 pm on Oct 14, 2003 (gmt 0)

10+ Year Member



Sounds to me like you are talking about programming for IE.

making buttons or googlebar type fields appear on IE isn't trivial.

I have never tried to alter the appearance of Ie, but I beleive it requires the use of COM. Do a search on COM ... and unless you are very familiar with c++, I think there is no solution to your problem.

I dont *think* there is any easy tool kit for IE.

SethCall

12:03 am on Oct 15, 2003 (gmt 0)

10+ Year Member



er.. no, you are talking about hta, like that one guy said.

This is a solution that will only realisitcally work on LANs. It is simply not a solution for the www.

MonkeeSage

2:51 am on Oct 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only way I know of to launch external applications is using the nsIProcess XPCOM interface (or a wrapper like jsLib) from a Mozilla chrome (Cf. External Application Buttons extension). No clue about how / if IE could do it. I've never heard of a way to do it from a regular web-page in any browser (thankfully!).

Jordan