How to execute batch file via PHP?

The main issue was of path and permission. I have gotten my batch file to execute.
Here is my solution:
  1. I run my batch file from the same folder the php file is in.
    exec("mybatch.bat");
  2. I make sure that Apache Service has enough permission to run the batch file. Just to test i used an administrator account for Apache to log on with.

Nikunj K

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.