I have written a v. small VB.NET program that spawns "cmd.exe" using Process, redirects stdin/out/err; works OK so far.

Does anyone know how to get :
* the details about the process currently running (if any) under cmd.exe (like how the command shell displays 'c:\windows\system32\cmd.exe - dir /s/b' when the dir command has been run); preferably not by using GetWindowText on the cmd.exe window
* the current directory of the command shell (even if some batch file or program has changed it)

Any help is much appreciated.