I have multiple batch files containing lines like
"schtasks.exe /create /tn NAME /tr \"cmd.exe /C \\\"start iexplore\\\"\" /sc once /st 03:05:43 /sd 12/18/2011"
and I would like to have my PHP file execute the batch file and thus schedule the multiple task..
exec("C:\\Wamp\\www\\batch\\$this->name.bat")
doesn't work and neither does
exec("cmd /K \"C:\\Wamp\\www\\batch\\123.bat\"")
works
The commands in the batch is inserted to the cmd but not executed.
But this is not the major problem..
When i try to simply
shell_exec("schtasks /create /tn NAME /tr \"cmd.exe /C \\\"start iexplore\\\"\" /sc once /st 03:05:43 /sd 12/21/2011");
in the apache log, it has
"ERROR: No mapping between account names and security IDs was done."
From other threads I figure this is permission problem, but I have no idea how to solve this.
EDIT: I am sure the schtask command is working fine. I echo the command, put it in the command prompt on the machine manually, and it works fine