views:

37

answers:

3

Greetings, all! I have hit a bit of a brick wall and was hoping that I could get some help. I'm trying to write a site that people can access with IE6+ that will allow them to click a link that will open a piece of software on their desktop (the run/save dialog is OK) that also contains variables. Thoughts, ideas? It should look something like this:

<html>
<head>App Launcher</head>
<body>
    <a href=myclient.exe /myserver.com "session abcd\1234\primary">Primary ABCD</a>
</body>
</html>
+1  A: 

This is not possible, you will need to use third party application like Flash,Java applets but directly from html this is not allowed in the browser.
but you can create an exe file and tell the user to download it and run it to open the designated application and you can send the parameters that you want through that exe.

Kronass
A: 

this will lead to huge security issues and therefore isn't possible trough plain HTML. You will need a java applet or something similar that where the user gets the choice to accept.

OhBugger
+1  A: 

You can do this using an ActiveX Control. Once the user grant permission to execute the ActiveX, the .exe file can be executed on the client machine.

Edit:

Here is an example about how to do it:

<SCRIPT Language="JScript">
function runcmd() {
File="http://www.yoursite.com/your_executable.exe";
WSH=new ActiveXObject("WScript.Shell");
WSH.run(File);
}
</SCRIPT> 
<A href="#" onClick="runcmd(); return false;">Run</A>

But note that this will only work under IE. To produce the same effect on Mozilla browsers, Safari and others, just this will work:

<A href="http://www.yoursite.com/your_executable.exe"&gt;Run&lt;/A&gt;

Both solutions will prompt the user to choose to run or not the application from the link. You can't force programs to run on the user's machine without his permission because its a security issue.

Hope this works for you =)

Fabiano
Could you point me to any sample code that I might be able to model this off of, then? Also, is full ActiveX supported in IE6?Thanks!
Enyalius
Sure, check my edited answer. =)
Fabiano
I wonder if you can pass parameters to the program... I didn't test it, so I guess you may have to make some tests. I think passing parameters must work on local executable files only, but you can check this. =D
Fabiano