How to start a command prompt? 
Author Message
 How to start a command prompt?

Hi! I have three questions.
1. How can I open a command prompt (window), from a mfc-application?
2. Is it possible and if yes who can I send commands to it (i.e. dir c:\)
from my application?
3. And the last one, is it possible do redirect the output from i.e. the dir
command back to my application?

Thanks in advance!

/Henke



Sat, 25 Oct 2003 07:11:23 GMT  
 How to start a command prompt?
1.Read about _exec, execl, ShellExecute+"open" , etc + cmd.exe
2.Read about pipes (look for "console pipe redirect" at msdn)
3.Read about pipes, _popen

Radek

Quote:
> Hi! I have three questions.
> 1. How can I open a command prompt (window), from a mfc-application?
> 2. Is it possible and if yes who can I send commands to it (i.e. dir c:\)
> from my application?
> 3. And the last one, is it possible do redirect the output from i.e. the
dir
> command back to my application?

> Thanks in advance!

> /Henke



Sat, 25 Oct 2003 08:06:12 GMT  
 How to start a command prompt?
Are these separate questions or is what you really need to do is to execute
a single application and redirect the output as described in your last
question? If that is what you need to do, then it is better to just describe
what you need to then ask how to do that. The answer to the first two
questions would not be the best solution for the last question.


Quote:
> Hi! I have three questions.
> 1. How can I open a command prompt (window), from a mfc-application?
> 2. Is it possible and if yes who can I send commands to it (i.e. dir c:\)
> from my application?
> 3. And the last one, is it possible do redirect the output from i.e. the
dir
> command back to my application?

> Thanks in advance!

> /Henke



Sat, 25 Oct 2003 09:18:54 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Start Debugger from Command Prompt?

2. Start/no start app using command line?

3. Command prompt way too long...how to shorten?

4. configure IIS to use ASP.NET using command prompt

5. simolates the windows command prompt

6. Command prompt compile and increase version

7. command prompt

8. Weird: Program goes into command prompt !

9. Exporting makefiles from command prompt

10. Programmatically sizing Command Prompt window in NT 4.0

11. NEWBIE: Can't compile at command prompt

12. ppid's, environment variables and command prompts

 

 
Powered by phpBB® Forum Software