Read it
E.g.
<?php exec('C:\\WINDOWS\\system32\\psexec.exe \\192.168.1.224 -u myuser ... etc.
I also see the following in the referenced discussion:
quote;
In Windows, exec() issues an internal call to "cmd /c your_command". This implies that your command must follow the rules imposed by cmd.exe which includes an extra set of quotes around the full command:
http://ss64.com/nt/cmd.html
Current PHP versions take this into account and add the quotes automatically, but old versions didn't.
endquote:
There is also some discussion about setting the Windows permissions on the folder where the command resides, which I can imagine could be quite the heartburn on a Vista or Windows 7 machine. You may need to allow access to the WAMPserver itself somehow.
EDIT:
The only other suggestions I can think of are:
one more thing occurs to me:
- copy your executable file to C:\WINDOWS\SYSTEM32, and run it as if it were "ping".
good luck!
Source(s):
Recommended reading: a lot of people discuss the solutions to a lot of problems
http://php.net/manual/en/function.exec.php
error_reporting(E_ALL);at beginning of your script and retry. What you see? What logs say?