Click to See Complete Forum and Search --> : Running .exe


kerene
03-01-2009, 06:46 AM
I have a problem here.
I have converted a matlab file (doing plotting) to .exe...and I need to run it on a web page. (ie: when user click on the button, they can run the file and do plotting).

I have the following code found on the web and I tried to understand it and change it but it doesn't work for me. Click on it no response. Please guide me on how to go about doing it. Thanks

The .exe file is located at the picture folder in my Apache ROOT file:
.\ROOT\design\picture


<html>
<head>
<script language="JavaScript" type="text/javascript">
MyObject = new ActiveXObject( "WScript.Shell" )
function RunExe() {
MyObject.Run("./picture/EPLM.exe") ;
}
</script>
</head>

<body>
<h1>Run a Program</h1>
<button onclick="RunExe()">Run</button>
</body>
</html>

Charles
03-01-2009, 07:21 AM
First that should be <script language="JScript"> and it will only work in MSIE and with all of the security restrictions dropped. What you are proposing to do is extremely dangerous to your users and it was a mistake for Microsoft to build Internet Explorer to allow this sort of thing.

If you are trying to use a web page to run the application on the user's box, think malware, then you first need to get the exe file there. You can either embed the exe in the web page or external script Base64 encoded, un-encoding it and saving it as required, or you can script the Windows FTP program to grab and save a copy. And you're going to want to deploy this as an HTML Application.

That's a lot but Google will lead you to all the instructions.

kerene
03-01-2009, 09:21 AM
Thank u for the info..
I have search on the net for quite some times before posting here. I'm totally in a lost about running .exe in html...
Could someone guide me here?

I suppose embed the exe in the web page is the easier way?

Fang
03-01-2009, 09:25 AM
Ask the user to download the exe

kerene
03-01-2009, 09:31 AM
how should be the code like? How should I embed it to the web page?

Charles
03-01-2009, 10:34 AM
Thank u for the info..
I have search on the net for quite some times before posting here. I'm totally in a lost about running .exe in html...That's because it can't be done. Look into HTML Applications and ActiveX