Re: cmd-window startup

From: Alan Illeman (spamtrap_at_crayne.org)
Date: 02/04/05


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



Relevant Pages

  • Re: [SLE] question about links to local hd
    ... Is there a way to create a link to a fully qualified path on ... > What you descibe can be done as user root by typing ... > assuming you are using a csh/tcsh type of sheel. ... > cdexcel on the command line and to immediately go where you want to be. ...
    (SuSE)
  • Re: New to Fortran on Win XP
    ... and then type "a.exe" (you may type the fully qualified path to ... on the command line or getting input from a file, ... enough (you can change the buffer size to a bigger one by clicking the ... After opening XEmacs, one ...
    (comp.lang.fortran)
  • Re: Finding server name or FQP?
    ... Is there a way to get information using VBA from the NET USE ... Or the Fully Qualified Path of a logical drive letter? ...
    (microsoft.public.excel.programming)
  • RE: Alternative to Windows Explorer
    ... The command line gives you a little more options than using the ... shift right-click plus scripts can be made for admins to run for ease of use ... Subject: Alternative to Windows Explorer ... to facilitate one-on-one interaction with one of our expert instructors. ...
    (Security-Basics)
  • Move to Server Still not working.
    ... I been using my local machine as ... When i checked the Event Viewer on the Server it is causing the following ... Instead, open a command window, ... After you set user rights in Windows Explorer, ...
    (microsoft.public.dotnet.framework.aspnet)