Prevent exe from opening a new command prompt window

Posted on


I am on windows 7 command prompt. When I run the following command

"C:Program Filesabc.exe" help  > out.txt

abc.exe is a third party program which displays some info. What happens is that a new window opens up, abc.exe help prints the output on the new window, the window then closes and I get back to my original window. The out.txt file remains empty.

How can I prevent abc.exe from opening a new window. Can I force it to display its output on the same original window so that it can be redirected to out.txt.


I was able to solve this.

In windows there is an option called “Open command prompt as Administrator”. A new window does not open up in that case.

It may be that the application doesn’t output to STDOUT or STDERR but try this

"C:Program Filesabc.exe" help  > out.txt 2>&1

Leave a Reply

Your email address will not be published.