title: Can a Win32 console application detect if it has been run from the explorer or not?
body: <p>I have to create a console application which needs certain parameters. If they are missing or wrong I print out an error message.</p>
  
  <p>Now the problem: If someone starts the program from the explorer by double-clicking the console window disappears immediately. (But the application is not entirely useless from the explorer, you could drag files onto it and it would work)</p>
  
  <p>I could <em>always</em> wait for a keypress, but I don't want that if the user did start it from the command line. </p>
  
  <p>Is there some way to distinguish between these situations? </p>