How to get on Windows PID of the last started process using WScript.Shell or similar?
I know how to start a process and get its PID:
Set oExec = WshShell.Exec( program )
Set pid = oExec.ProcessID
Now the problem is that the program is another batch (or could be VBScript). The batch starts a real program which PID I would like to get.
On Linux (shell script) it is very easy to do. just pid=$!
But what can I do on Windows?
oExec.StdOutproperty but never tried it so far... – Dime Jul 28 '11 at 8:11