Date: Sun, 11 Apr 1999 14:17:33 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Laurynas Biveinis cc: "Salvador Eduardo Tropea (SET)" , DJGPP Workers Subject: Re: LBInstDJ In-Reply-To: <001901be836b$4917fa00$5f003bd4@default> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.