Running .exe files from a web application
===

I am attempting to program a web-based application that will allow a user to input information (specifically, integers) into form fields, add the information entered as an entry in a .def file, run '.exe' files (written in C++) on the file, and then display output on the screen after clicking on a "submit" button. I have written functions to run the .exe files in JavaScript, but they don't work. Here is what I have so far:

The input screen has this code (HTML file):

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html><head></head>><body><h1><i>The University of Vermont<br>Department of Medical     Biostatistics<br>Study Randomization Page</i></h1>
    <?php
    $study = "study";
    $site = "site";
    $gender = "gender";
    $age = "age";
    $result = "result";
    ?>

    Please Input Your Study Information Below:<br><br>
    <form id="form1" action="file:///C:/Documents and Settings/cody/Desktop/DMB_RD_2.php"     method="post">
    Study Number:<br>   <input name="study" type="int"><br>
    Site Number:<br>    <input name="site" type="int"><br>
    Subject Gender:<br> <input name="gender" type="int"><br>
    Subject Age:<br>    <input name="age" type="int"><br>
    Lab Result:<br>     <input name="result" type="int"><br>
    <input value="Submit" class="button" type="submit">
    </form>
    </body></html>
    Here is the page it is connected to (PHP file);
    <script type="text/javascript" src="DMB++2JS.js"></script>
    <script type="text" src="DMB Round 2.html"></script>
    </head>
    Here is the information that you input:<br /><br />
    Study Number: <?php echo $_POST["study"]; ?><br />
    Site Number: <?php echo $_POST["site"]; ?><br />
    Subject Gender: <?php echo $_POST["gender"]; ?><br />
    Subject Age: <?php echo $_POST["age"]; ?><br />
    Lab Result: <?php echo $_POST["result"]; ?><br />
    <br />
    The following functions will randomize your data. Please indicated which method you would like to use by clicking on the button of the randomization method that you would like to use:<br /><br />
    <input type="button" href="blockfn()" onclick="javascript:blockfn(); return     true;">Block Function</button><br />
    <input type="button" href="d2rfn()" onclick="javascript:d2rfn(); return true;">Random Distance Function</button><br />
    <input type="button" href="d2dfn()" onclick="javascript:d2dfn(); return true;">Determinate Distance Function</button><br />
    <input type="button" href="minimizefn()" onclick="javascript:minimizefn(); return true;">Minimization Function</button><br />
    <input type="button" href="pocockfn()" onclick="javascript:pocockfn(); return true;">Pocock Function</button><br />
    </body>
    </html>

Here is the JavaScript file with the functions written in it:

    function d2rfn(){
    var oShell = new ActiveXObject("Shell.Application");
    var commandtoRun = "C:\Documents and Settings\cody\Desktop\C++ Programs\D2R001.def"; 
    oShell.ShellExecute(commandtoRun,"","","open","1");
    
    }
    function d2dfn(){
    var oShell = new ActiveXObject("Shell.Application");
    var commandtoRun = "C:\Documents and Settings\cody\Desktop\C++ Programs\D2D001.def"; 
    oShell.ShellExecute(commandtoRun,"","","open","1");
    
    }
    function minimizefn(){
    var oShell = new ActiveXObject("Shell.Application");
    var commandtoRun = "C:\Documents and Settings\cody\Desktop\C++ Programs\MINIMIZE001.def"; 
    oShell.ShellExecute(commandtoRun,"","","open","1");
    
    }
    function pocockfn(){
    var oShell = new ActiveXObject("Shell.Application");
    var commandtoRun = "C:\\Documents and Settings\\cody\\Desktop\\C++ Programs\\POCOCK2001.def"; 
    oShell.ShellExecute(commandtoRun,"","","open","1");
    
    }
    
    //Another possible way of calling the .exe file from the web interface.
    var objShell = new ActiveXObject("WScript.Shell");
    </script>

Finally, I write the file in ASP (which doesn't work):

    <%
    dim Study
    Study=Request.QueryString("Study")
    If Study<>"" Then
      Response.Write(Study)
    End If
    
    dim Site
    Site=Request.QueryString("Site")
    If Site<>"" Then
      Response.Write(Site)
    End If
    
    dim Gender
    Gender=Request.QueryString("Gender")
    If Gender<>"" Then
      Response.Write(Gender)
    End If
    
    dim Age
    Age=Request.QueryString("Age")
    If Age<>"" Then
      Response.Write(Age)
    End If
    
    dim Result
    Result=Response.QueryString("Result")
    If Result<>"" Then
      Response.Write(Result)
    End If
    %>

Does anybody have a cleaner way to create this application? It would be much appreciated. Thanks!