title: Ping error return always equals 0
body: <p>Having trouble getting this code to work. I can run the script (with changes) in vbscript and it runs fine. But I cant get this version to return a ping error return value other than 0. Any help is appreciated.</p>
  
  <p>This is scanning a list of remote machines with checkboxes and returning the checked values. I want to run the ping to verify the remote machine are there before continuing. But with a error return of 0 for all queries its useless.</p>
  
  <pre><code>function statuschk3(){
  var checkedValue = null; 
  var inputElements = document.getElementsByName("comp");
  for(var i=0; inputElements[i]; ++i){
    if(inputElements[i].checked)
    {checkedValue = inputElements[i].value;
  var WshShell = new ActiveXObject("WScript.Shell");
  var status = WshShell.run ("ping -n 1 -a"  + checkedValue + ",0 ,true");
      if(status == 0)
      {   var fso = new ActiveXObject("Scripting.FileSystemObject");
          var s = fso.OpenTextFile("C:/script/testfile1.txt", 8, true);
          s.WriteLine(checkedValue + " is turned off or off the domain");
          s.Close();
      } 
      else` 
  </code></pre>