I searched the web for that question and landed on Server Fault:
Can I send some text to the STDIN of an active process running in a screen session?
Seems like it is ridiculously easy to achieve this under Linux. But I need it for a Win32 Command Prompt.
Background: I have an application that polls STDIN and if I press the x key, the application terminates. Now, I want to do some automated testing, test the application and then shut it down.
Note: Just killing the process is not an option since I'm currently investigating problems that arise during the shutdown of my application.