Thanks!
As always using the right keyword in a google search can do magic!
I've found a nice function that executes a command line and returns the output to a CString using CreateProcess and pipes.
Link:
http://snipplr.com/view/35935/mfc-run-command-such-as-ping-127001-and-get-stdout-in-a-cstring/
Credits to the author.