JordyvD
JordyvD

Reputation: 1615

Multiple commands same CMD window

Would it be possible to send multiple commands to the same CMD window?

example: user hits GO the code sends a startserver cmd command opening a game server in console mode. When the user hits ban I want the program to send BAN to that same console window (the server's window).

Upvotes: 0

Views: 139

Answers (1)

James Thorpe
James Thorpe

Reputation: 32212

Rather than attempting to do everything through the external CMD process, you should instead spawn the game engine process yourself directly to give you more control.

During the startup of the process, use the RedirectStandardOutput and RedirectStandardInput properties to gain access to see the output and send commands to the game server.

Upvotes: 1

Related Questions