currently i have a small (LAN only) web server running on my computer, and i would like to be able to make a web page in which i can run a program on the server computer from another compuer. say, for instance, i click a button on the web page running on the server, i want that action to run a .exe on the server. i came up with this code, but it doesn't run it server side, it runs it on the computer with the browser.

<TITLE>Run Executable HTA</TITLE>
<body bgcolor=#565656>
<script language="javascript" type="text/javascript">

function runtest()
var oShell = new ActiveXObject("WScript.Shell");
var prog = "C:\\teset.exe";
oShell.run ('"'+prog+'"',1);

<input type="button" onclick="runtest()" value="test">

any ideas? Thanks!

8 Years
Discussion Span
Last Post by crackerjacker

That is because javascript is a client side language. If you use for example php on your server, you can use exec() to run something serverside. (http://php.net/exec). Every server script/language has a way to do it.

Edited by pritaeas: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.