title: Running a batch file using JavaScript in web browser
body: <p>I'm having a nightmare here, please help.</p>
  
  <p>Here is my JavaScript: </p>
  
  <pre><code>&lt;script language="javascript"&gt;
      function MyCmd();
      var shell = new ActiveXObject("Shell.Application");
      var appExe =  @"D:/ping.bat";
      shell.ShellExecute(appExe , "", "", "open", "1");
  &lt;/script&gt;
  </code></pre>
  
  <p>I call this function from inside a <code>&lt;td&gt;</code> in a table..</p>
  
  <pre><code>&lt;button style="width:relative; height:65"  onClick="MyCmd()"&gt;&lt;b&gt;Netstat&lt;/b&gt;&lt;/button&gt;
  </code></pre>
  
  <p>All I want is to see the batch file running. Content of the batch file is: <code>netstat &gt; ping.bat</code>, and it's located on <code>d:\</code>. Any ideas?</p>