www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/12/11:30:53

Date: Mon, 12 Apr 1999 11:31:33 -0400
Message-Id: <199904121531.LAA18833@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <002101be84f8$a8869260$b1003bd4@default> (lauras@softhome.net)
Subject: Re: LBInstDJ
References: <002101be84f8$a8869260$b1003bd4 AT default>
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

> I will do this too, but for other purpose - I will insert %PATH% in any
> path setting lines where it is missing. This will help to ensure that djdir
> on the 1st path line will not be skipped and will repair broken autoexec.bat
> where first paths are not included by laters.

This may add other directories to the user's path that weren't there
before.  I wouldn't do this.

I think the right way (also the hard way) is to read autoexec into
memory, and find the *last* path statement (last in each section for
menu-driven ones) and modify that.  If there is no path statement, add
one at the beginning of the file.  Probably want to special case "win"
and edit the last path before that.

- Raw text -


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