When I use the system() command a dos prompt pops up. How can I supress this dos window?
Printable View
When I use the system() command a dos prompt pops up. How can I supress this dos window?
Why use system to do stuff when you can use better functions, like those mentioned in
http://faq.cprogramming.com/cgi-bin/...&id=1043284392
Ok I want to send a command to the cmd.exe and get the output back. What function would you use to do this?Quote:
Originally Posted by Shakti
Try _popen() - it works much like fopen()
Also, which command are you trying to read the output of?
If it's something like "dir", then there are better alternatives.
Any ;) That what the user inputs in my programm should go to the cmd.exe the output back to my programm.Quote:
Originally Posted by Salem
OK works fine, but the dos box still pops up :(
You can use win32 api function CreateProcess() which has an option disable the command window, but it works more like system() than _open().