It might be a basic question, but bear with me as google didnt help.
I want to create awrapper for cmd.exe that is more comfortable in terms of user interface (I enjoy a lot Konsole in *nix). Right now I have no Idea how to hook to cmd.exe and get the results. I want to have my own window for user to type commands but cmd.exe is the one to do the job.

So how do I connect my app to cmd

You sould completly replace cmd.exe with your own version of that program. For example Microsoft has already done it with PowerShell. Another example here

Nope!
I want to make GUI wrapper on top of cmd.exe
I want to make something flexible but still backend should remain as cmd.exe. Only a front end. so I was looking for way to hook my GUI to cmd.exe sending commands typed to it and getting results back. I hope that is wrapper than purely new shell. I will check for power shell though

I suppose you could have your gui present a list of commands, then when the user selects one just have your program use system(), ShellExecute(), or CreateProcess(), depending on how much control you want to have over it, to execute it,

CreateProcess(). There may be some internal cmd.exe functions that can only be executed with system(), such as "cls", so you may have to experiment with it.

This article has been dead for over six months. Start a new discussion instead.