www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/11/07:19:28

Date: Sun, 11 Apr 1999 14:17:33 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurynas Biveinis <lauras AT softhome DOT net>
cc: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>,
DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Re: LBInstDJ
In-Reply-To: <001901be836b$4917fa00$5f003bd4@default>
Message-ID: <Pine.SUN.3.91.990411141712.28502c-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 10 Apr 1999, Laurynas Biveinis wrote:

> I think I have found acceptable solution, implemented it and it works good:

Let me serve as a Devil's advocate here, and alert you to some
potential problems.

> 1) insert @SET DJGPP=... as first line in autoexec.bat

Problem no.1: how do you know which autoexec.bat to edit?  (Some
systems, like Windows 98 and NT, has them in special places under
special names.)

Problem no.2: you might get "Out of environment space" if you simply
add a variable; you need to find a way to detect such problems and
deal with them.

> 2) look for first line with "path=" but not "rem"

Problem no.3: don't forget the colon `:' that can also mark a comment
line (rarely used, but you can be sure somebody out there does it).

Problem no.4: what about those autoexec.bat files which define
multiple configurations?  In these cases there's more than a single
PATH= line that needs to be changed.  How do you know which ones?  And
some of the configurations might not be appropriate for running DJGPP;
only the user will know which ones.

Problem no.5: some systems set PATH like this:

	PATH c:\foo\bar;d:\baz

i.e., no leading SET and no equals sign.

Problem no.6: changing PATH might also overflow the environment; see
problem no.2 above.

Problem no.7: some malformed autoexec.bat files can override PATH=
settings in a later line (I saw too many of these!), so the first line
is probably not a fool-proof solution.

> And I create new autoexec.bat if there isn't one :)
> (Who will need this feature?

Lots of people, IMHO.  The default in Windows 9X is not to have
autoexec.bat at all.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019