title: Running a batch file kept in root of IIS folder from a php webpage hosted on it
body: <p>I am newbie to PHP programming and IIS. Somehow I managed to have my php application hosted on IIS server. I am able to perform all the data base transactions successfully. But now I am trying to run a batch file which is available in the root of IIS. </p>
  
  <p>I have tried these two options below</p>
  
  <pre><code>$output=exec("C:\windows\system32\cmd.exe /c Start C:\inetpub\wwwroot\drupal\modules\batch\RunSuite.bat", $out);
  </code></pre>
  
  <h1>cmd.exe is copied to the root folder before executing this line</h1>
  
  <pre><code>$output=exec($_SERVER['DOCUMENT_ROOT']."\cmd.exe /c Start".$_SERVER['DOCUMENT_ROOT']."\drupal\modules\batch\RunSuite.bat", $out);
  </code></pre>
  
  <p>both of them do not work. Could you please help me to solve this issue? I am sure it is my ignorance :-(</p>
  
  <p>First line of the above code works as expected, if we host the entire application using drupal locally and run it. I assume, it would be some configuration / permission issues, while triggering the batch as a service in IIS. Your help is really appreciated.</p>
  
  <p>Thanks and Kind Regards</p>
  
  <p>Anil</p>