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
But what can I do on Windows?