Reputation: 285
I try to wrap the cmd.exe console and would like to be able to use the underlying command interpreter to be run by my app. This will allow me for ex to execute dynamically created script and other thing ( the question is not about how to do execute dynamically created script , but about getting an interpreter loop around the different command of the shell ). My last option would be to rewrite the command myself(copy,dir,...) but would rather reuse the the cmd.exe interpreter.
Thx
Upvotes: 0
Views: 480
Reputation: 4952
take a look at cmd.exe replacemnt opensource project - Console you might be able to modify this code
Upvotes: 1
Reputation: 45598
Well this will probably be difficult. But you could invoke cmd.exe with the /k command
option and redirect stdin/stdout to your own buffers. See Creating a Child Process with Redirected Input and Output for information on the stdin/out redirection.
Upvotes: 1