title: .bat calling through javascript code
body: <p>i m trying to call a .bat file through my java script code...the bat file in turns calls a java file..but i m facing an error with the calling of .bat file plz help....also it gives mi error with the java class....
  is this code rite??</p>
  
  <pre><code>    &lt;html&gt; 
         &lt;head&gt; 
                   &lt;script language="JavaScript" type="text/javascript"&gt;  
                   MyObject = new ActiveXObject( "WScript.Shell" )  
                   function Runbat()   
                   {  
                    MyObject.Run("C:\\Documents and        Settings\\shraddha\\Desktop\\test.bat") ;  
         }  
  
            &lt;/script&gt; 
              &lt;/head&gt; 
             &lt;body&gt; 
            &lt;h1&gt;Run a Program&lt;/h1&gt; 
                      This script launch the file any bat File&lt;p&gt; 
              &lt;button onclick="Runbat()"&gt;Run bat File&lt;/button&gt; 
          &lt;/body&gt; 
                &lt;/html&gt; 
  </code></pre>