i need to exexute a command through cgi that is located in C:\Program Files\Some Program\ directory, hovever when i have this in my perl script (among other things):
system("C:\Program Files\Some Program\runit.exe");
it doesnt run and the following would appear in the apache error log:
[Sat Jan 22 10:05:33 2005] [error] [client 192.168.0.5] 'C:Program' is not recognized as an internal or external command,\r
[Sat Jan 22 10:05:33 2005] [error] [client 192.168.0.5] operable program or batch file.\r
btw, when i try to escape \ the error says .... 'C:\\Program' is not recognized ...
Looks like this is a problem with white spaces in the path.
How can I execute this command without physically renaming my directories to eliminate white spaces?
When I add the path to the invironment and just do this:
system("runit.exe");
the error says:
[Sat Jan 22 09:56:27 2005] [error] [client 192.168.0.5] 'runit.exe' is not recognized as an internal or external command,\r
when i run the script manually from the command line (in the cgi directory) it works fine, but when i try to run it through the web browser it generates the above error.
Any suggestions on how to get this to work?
Start Free Trial