Running Windows Process in Windows Environment and Returning the Output
Posted on 2007-10-01
I'm currently working on a project where I'm running PHP on a Windows 2000 server on IIS and I'm trying to run a process on the server and return the output. I've tried multiple techniques including all of the shell, exec, etc. functions to no avail. I've also tried the Run and Exec Methods (Windows Script Host).
What happens is when I try to run the process, it seems to run but then PHP waits for the command to finish executing or close before the script continues. This is not a problem with commands such as "dir" but the specific process I'm trying to run is pslist.exe from the PsTools package for Windows.
The furthest I got was printing out the output of "dir" using the Exec Windows Script Host Method.
Thanks in advance!