0

Possible Duplicate:
Launch application from a browser

I am working on a website for my work that will do multiple functions such as storing login information and launching multiple applications by clicking one button. I am using php to make the pages. The user information is being stored in a mysql database. However I am having a problem getting the applications to launch. I have gotten a few sudjestions like using Registering an Application to a URL Protocol. Problem is I haven't done much programming using C++ or VB for a very long time (highschool). The other idea that seems to possibly work is using WSH Run Method in javascript. Close but I am still having issue launching a program as simple as notepad.exe or cmd.exe for firefox or IE. This is the code I found after browsing around the web for half the night. If anybody has any ideas on how I would be able to use a script like this or anyother that might work, your help would be very much appreciated. Here is a sample code.

<script language="javascript" type="text/javascript">
function runApp(){ 
var shell = new ActiveXObject("WScript.shell"); 
shell.run("notepad.exe", 1, True); 
}
</script>

<input type="button" name="button1" value="Run Notepad" onClick="runApp()" />

Thanks again

Community
  • 1
  • 1
blackStar
  • 339
  • 4
  • 8
  • 18
  • Have you looked at the java applets? I think it is possible to run external application from java applet. – Andrey M. Sep 13 '11 at 08:01

2 Answers2

0

You can't run any executables from browser due to security reasons. As solution you can use html applications (add .hta extension to your html file).

alrusdi
  • 1,273
  • 1
  • 7
  • 9
0

You can not run commands on the client, but there are possible solutions:

  1. You could host standalone executables on your server and provide a link. You will also need to sign those executables and put the certificate on the clients. Then, with Internet Explorer, you could configure it to automatically run .exe files (they will be stored in your Interent temporary files while being executed)

  2. The other might be to develop a small extension for firefox which handles the requests to run those programs

I hope my ideas helped

Christian Bock
  • 441
  • 3
  • 6