Skip to main content
gamedev.net
🔒 Locked

Launch application from javascript

Started by jimywang 7 replies 5.1k views
Original Post
jimywang
jimywang
I just wondering if there is a way to use client site java script to run a application on a client machine.any advise will be appreciated.
domstyledesign
domstyledesign
you could use activeX controls.... but they're unsafe.

this should work in IE
run notepad
<html><body><a href="c:\windows\system32\notepad.exe">run notepad</a></body></html>
antareus
antareus
It doesn't. Do you know how much havoc a website could wreak if it could run programs on your computer behind your back? It'd be child's play to make an image file's reference be set to erase the windows folder when loaded.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
domstyledesign
domstyledesign
my bad, i think the document has to be local too.

copy and paste that code into a text editor, and save it as a .html file on your pc. then try.

*there may still be certain security settings which will still prevent this from working.
Halo7
Halo7
If it is possible, then it's an exploit in the browser such as the one detailed at http://www.securityfocus.com/bid/1394/info/

One of the (many)reasons I now use firefox.

-Halo7
domstyledesign
domstyledesign
save this code in a .html file on your hd

<html>  <body>   <a href="file://c:\windows\system32\notepad.exe">run notepad</a>  </body></html>


open file in firefox and click, select "Open With Default"

this may or may not require an extension, such as Open Download
Halo7
Halo7
Quote:
Original post by domstyledesign
save this code in a .html file on your hd

*** Source Snippet Removed ***

open file in firefox and click, select "Open With Default"

this may or may not require an extension, such as Open Download


The Open/Save dialog came up with only the option to save. What was your point?

-Halo7
Promit
Promit
This is impossible due to security restrictions.

So...you can't.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
domstyledesign
domstyledesign
alright, i tested it, and it works with Open Download and Firefox 1.0pr.

it does not work w/out the extension, but it does work with it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.