Assuming Windows, is there a way I can detect from within a batch file if it was launched from an open command prompt or by double-clicking? I\'d like to add a pause to the
crazy idea: use tasklist and parse it's results. I've wrote in a test batch file:
tasklist > test.out
and when I double-clicked it, there was an additional "cmd.exe" process just before the tasklist process, that wasn't there when the script was run from command line (but note that might not be enough if someone opens a command line shell and then double-click the batch file)