in reply to Unable to run batch file in CGI Script

system ('C:/BatchTest/test.vbs') == 0 or print "Error: $!\n"; is returning the following error "Error: No such file or directory".


But when i execute it through command prompt, its executing fine.
  • Comment on Re: Unable to run batch file in CGI Script

Replies are listed 'Best First'.
Re^2: Unable to run batch file in CGI Script
by almut (Canon) on Sep 23, 2009 at 14:19 UTC
    No such file or directory

    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.