Re: cmd-window startup
From: Alan Illeman (spamtrap_at_crayne.org)
Date: 02/04/05
- Next message: amitkr: "Re: MD5 , RC4 Code"
- Previous message: Pierre Lopan : "Re: MD5 , RC4 Code"
- In reply to: Alex McDonald: "Re: cmd-window startup"
- Next in thread: Alex McDonald: "Re: cmd-window startup"
- Reply: Alex McDonald: "Re: cmd-window startup"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 4 Feb 2005 15:07:03 +0000 (UTC)
"Alex McDonald" <spamtrap@crayne.org> wrote in message news:1107464792.572276.262310@f14g2000cwb.googlegroups.com...
> 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
What the user types in on the command line starts at argv[1], not
argv[0], the latter being the path and name of the executable.
Anyway.. I checked both argv[0] and argv[1..] (I always parse these
in asm programs I write) and there are never any quotes present.
Nice idea, though ;-)
(writing .com programs in Windows 2000 Pro, using Masm 6.11)
I compared the environment strings in both cases: same, and
compared the MCB chain in both cases: also the same. I'll keep
digging...
>Alan
- Next message: amitkr: "Re: MD5 , RC4 Code"
- Previous message: Pierre Lopan : "Re: MD5 , RC4 Code"
- In reply to: Alex McDonald: "Re: cmd-window startup"
- Next in thread: Alex McDonald: "Re: cmd-window startup"
- Reply: Alex McDonald: "Re: cmd-window startup"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|