I am making a console application whose sole user interaction is form based. Lets say there is a button on my main form which, when clicked, must run another program via command prompt. I've been trying to find a way to do the following steps in a hardcoded manor:
1) open a command prompt
2) change the directory to the folder path the other program lies in
3) run said program
All of these would preferably be done without the command prompt being visible to the user. So far I've achieved step 1, which seemed the easy part. I can't however figure out how to input commands to the prompt, which is what is needed to do the next two steps.
I've been opening command prompt by writing
ProcessStartInfo startInfo = new ProcessStartInfo("cmd.exe");
after I changed aspects like startInfo.CreateNoWindow
I'd very much appreciate some direction here. Also, please let me know if you'd like additional information.