[nycphp-talk] WAMP (minus the M) forking question - also open to other ideas
Dan Cech
dcech at phpwerx.net
Wed Apr 29 08:57:03 EDT 2009
Michael J. Forte wrote:
> - I found COM(Wscript.Shell) ... $->Run(...) on the web but could not get it
> working. It would spawn a cmd.exe but would not run the rest of the command. The
> cmd.exe child would not die. If I ran the same command from Start > Run it would
> work just fine.
>
> $WshShell = new COM(Wscript.Shell);
> $oRun = $WshShell->Run("cmd /C php.exe -f child.php");
I've had luck in the past with:
$shell = new COM('WScript.Shell');
$shell->Run('php.exe -f child.php',0,false);
The additional parameters basically tell it to skip creating a window
and not wait for the command to return.
http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx
Hope this helps,
Dan
More information about the talk
mailing list