I have a php from where I have to call a cmd, and from that cmd I have to start an exe using psexec. My php, cmd, psexec.exe and the exe I actually need to run are in the same folder.
php:
shell_exec("runas.cmd");
runas.cmd:
@echo off
psexec -u userName -p password my.exe
If I run the php I can see in the task manager that PSexex.exe is stared but my.exe is not. Also if I run runas.cmd by double-clicking on it, everything is just fine.
add 2>&1 after the command and print shell_exec response to see whats actually happen