I am attempting to write a C++ console application that will do the following:
Open up a Command Prompt window.
Pass a text string to the Command Prompt (like “del filename.txt”).
The Command Prompt will execute the command and then return control to the C++ program.
I am using CreateProcess to invoke the Command Prompt window. I am not sure how to send a string to the Command Prompt window. I saw the function called SendMessage. Would SendMessage be the best/easiest way to send a text string to the Command Prompt?
Thanks
Open up a Command Prompt window.
Pass a text string to the Command Prompt (like “del filename.txt”).
The Command Prompt will execute the command and then return control to the C++ program.
I am using CreateProcess to invoke the Command Prompt window. I am not sure how to send a string to the Command Prompt window. I saw the function called SendMessage. Would SendMessage be the best/easiest way to send a text string to the Command Prompt?
Thanks