A Program I have to work with opens a CMD-window with a message after processing some data. The message is something like "finished processing" and I don't have access to the code behind the other Programm.
The goals I want to achieve is:
- Get the message from the CMD-window and write it to a text box (or similar) in my own programm.
- Close the CMD-window
I managed to attach the process to my programm using Process[] localByName = Process.GetProcessesByName("cmd"); but I can't manage to get the output.
Thank you for your help.
Edit: To elaborate a bit further about the circumstances of the problem: I start the other programm with a command line command. I pass some parameters and after a bit, the other programm opens a cmd window with the message. If i open the other programm normally, then the message is displayed within the application. None of the parameters give me the option to manipulate the output and i am not able to pipeline the output to another file.
As for why i have to do this: I was given the task to add quality of life improvements to the other programm and using the command line is the easiest way to access the functionality of the other programm. The other solution available would be to reverse engeneer the processing of the data.