Question Capturing text from cmd.exe

WG1

Member
Joined
Mar 12, 2010
Messages
8
Programming Experience
Beginner
How can I capture text from cmd.exe window? Tried GetWindowText, but this only returns the title.
 
Did you open it yourself?

Used process start and can get text if standard output is redirected, however can't interact with cmd.exe afterwards. In a nutshell, need to enter a command, wait for response, then enter another command based on response. Cmd.exe is executing an external app.
 
External app is executed by cmd.exe only.
You're saying it's an internal command of the cmd.exe shell, such as DIR etc? Any standalone .exe you can start directly with Process.
 
Back
Top