Re: cmd-window startup

From: Alex McDonald (spamtrap_at_crayne.org)
Date: 02/03/05


Date: Thu, 3 Feb 2005 21:24:01 +0000 (UTC)

The commandline for programs invoked by double-clicking on the file in
Windows Explorer will contain a fully qualified path, enclosed in
double quotes (found in argv[0] in C terms). For commands run from the
command line, it's possible but fairly unlikely that the user typed a
quoted string. You could check argv[0] for the lack of a leading " to
test for this. However, that makes your program behave inconsistently;
other programs don't do this.

-- 
Regards
Alex McDonald


Relevant Pages