Click to See Complete Forum and Search --> : Windows exec() problem


Anon
01-30-2001, 07:32 PM
Hey guys
It seems we tryed everything but still missing something. I was trying to execute program which is located in spec folder I put full path and all parameter for executing this program inside of exec func and it didn't work. It seems it allows us to execute only shot command like: exec("ping 127.0.0.1 > test.txt"); but something like this:
exec("\"C:\\Program Files\\macromedia\\generator 2\\generate.exe\" -swf \"E:\\Inetpub\\development\\vm2\\temp\\test.swf\" \"E:\\Inetpub\\development\\vm2\\jpgtemplate.swt\" -param filename \"E:\\Inetpub\\development\\vm2\\temp\\someimage.jpg\"", $AllOutput, $ReturnValue);
Please look at this. We need your help.
Ok thank in advance
If you need to contact me : sergey@oddcast.com
Sergey

Anon
02-03-2001, 12:15 AM
why don't you package the command as a batch file and run the batch file instead?

@echo OFF
# command here

# exist status code here

in php script
exec("somebatch.bat");

you may want to dust off some old DOS books for the syntax but in theory this should work.