Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

"C:\Program Files\abc.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.

share|improve this question

migrated from stackoverflow.com Jun 5 '13 at 18:01

This question came from our site for professional and enthusiast programmers.

Can you post some of the abc.exe code? –  demonofnight Jun 5 '13 at 15:03
@demonofnight: The question says abc.exe is a third party program, which means that's probably unlikely. –  Ken White Jun 5 '13 at 15:29
Its an EMC program to get some details about the storage system. –  Sumedh Jun 5 '13 at 16:07
add comment

2 Answers

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

"C:\Program Files\abc.exe" help  > out.txt 2>&1
share|improve this answer
That did not work. –  Sumedh Jun 10 '13 at 17:26
add comment
up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.