-1

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?..

thanks.

9
  • Different working directory perhaps? Some more info would be nice...
    – RichardOD
    Nov 28, 2010 at 19:47
  • 1
    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. Nov 28, 2010 at 19:48
  • 2
    Member for 33 days, no questions accepted, no votes cast. Nov 28, 2010 at 19:49
  • 1
    What Paul and Andrew said.
    – withoutasound
    Nov 28, 2010 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!" Nov 28, 2010 at 19:52

2 Answers 2

4

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.
0

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

1
  • 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, 2011 at 15:42

You must log in to answer this question.