Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey, I have a console *.exe file.

the wierd thing is that if I run the file by double clicking it - the output is one thing. but if I run the file through the cmd window - the output turns out different.

I checked it several times, and it's consistent.

why would this happen?..


share|improve this question

migrated from Nov 29 '10 at 4:40

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

Different working directory perhaps? Some more info would be nice... – RichardOD Nov 28 '10 at 19:47
I down-voted this terrible question. No good information on what is happening or how the app was developed. to boot, it's coming from a user who just can't be bothered to click a Vote or Accept now and again as thanks for all the answers he's gotten. – Andrew Barber Nov 28 '10 at 19:48
Member for 33 days, no questions accepted, no votes cast. – Paul Tomblin Nov 28 '10 at 19:49
What Paul and Andrew said. – withoutasound Nov 28 '10 at 19:51
@Paul Tomblin: and he's gotten numerous decent answers, to boot, including discussion back to his follow-ups. How hard is it to take one second to learn how to click a link here or there to say, "thanks!" – Andrew Barber Nov 28 '10 at 19:52

Can't say much without the actual output in both cases, but my guess would be that it is one of the following:

  1. The environment variables are different.
  2. The program is able to detect how it is started.
  3. The icon you clicked on the desktop actually has some property settings attached.
share|improve this answer

ooa program is a command, every command is a program

have you ever noticed that when you don't input a normal command it reads something like "'what you typed' is not recognized as an internal or external command, operable program or batch file."

notice the operable program part also have you ever thought that those cmd commands (i.e. cd, dir, ftp) are on your hard drive

because they are

when you type "dir" in a cmd window it actually loads the program called dir

the computer thinks that your program is one of the systems

so it simply loads in the same window

the way you load it does not effect the program it just effects how it is shown

if you don't like clicking: run: "your program.exe" than just make a shortcut on your desktop

tell me if anything is poorly explained

share|improve this answer
Rubbish. you could be a Indian meditation guru meditating over computer concepts with paradoxes, in a part of india where nobody knows about computers. You haven't figured out the technicalities. – barlop Jul 5 '11 at 15:42

You must log in to answer this question.