Disabling the window when using a pipe (|) filename

I am trying to use a pipe filename to communicate with the sqlcmd command so i can continuously feed it sql commands.

So my filename looks like this:  | cmd /k sqlcmd -o output-filename

I can sucessfully communicate back and forth with sqlcmd so that works fine,

My problem is when i open the file it creates a console window.

Is there anyway i can prevent the console window from popping up?

Thanks in advance for any help.

I am compiling to INT/GNT using Visual Studio (Version 7)