I have a command line program running and I would like to send additional commands to it (I.E. Once it is already running) How can I do this in C#?
If the process is started by your C# program, then you can use Process.StandardInput to send commands to it.
If you are sending command to other processes, you can use the SendKey class as demoed in here.
A few possibilities:
Handling Messages in Console Apps
How to send command to console application from GUI application
How can I send keypresses to a running process object? (from @Truewill)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With