Hi,

I have a way to get the Process ID in PHP from a process running in windows ...

$com = new COM('WScript.Shell');
$exec = $com->Exec($command);
$pid = $exec->ProcessID;

It works very well, my problem is that I ALSO would like to get the STDOUT, and this option doesn't work ...

$com = new COM('WScript.Shell');
$exec = $com->Exec($command);
$pid = $exec->ProcessID;
$output = $exec->StdOut->ReadAll;

How can I get both, namely PID and STDOUT?

Thank you in advance for your help!!
Mapg

    Write a Reply...