title: Batch file called from Javascript/XPCOM doesn't show command prompt window
body: <p>I am calling a batch file from Javascript in this fashion:</p>
  
  <pre><code>function runBatch(){
      var exe = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
      exe.initWithPath("C:\\test.bat");
      var run = Components.classes['@mozilla.org/process/util;1'].createInstance(Components.interfaces.nsIProcess);
      run.init(exe);
      var parameters = ["hi"];
      run.run(false, parameters,parameters.length);
  }
  </code></pre>
  
  <p>my test batch file is:</p>
  
  <pre><code>echo on
  echo %1 
  pause
  exit
  </code></pre>
  
  <p>Each time I call a batch file, however, the command prompt is not displayed, as it would be if I simply ran the batch file from the desktop.  How can I remedy this and display a command prompt for the batch file?</p>
  
  <p><strong>Edit</strong>
  To be clear, the cmd.exe process is launched - I can see it in the task bar.  But no window gets displayed.  This snippet behaves similarly:</p>
  
  <pre><code>function runCmd(){  
  var exe = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
  exe.initWithPath("C:\\WINDOWS\\system32\\cmd.exe");
  var run = Components.classes['@mozilla.org/process/util;1'].createInstance(Components.interfaces.nsIProcess);
  run.init(exe);
  run.run(false, null,0);
  }
  </code></pre>