Is your webserver running on the same machine that the file resides on? (It's the webserver that runs the CGI script - and thus the system() command - not the browser — Just in case...)
Yeah. Apache web server is running in the same machine. I even tested the program by placing the batch file in cgi-bin folder and htdocs folder but no use.