home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.misc
- Path: sparky!uunet!gumby!destroyer!gatech!taco!dspascha
- From: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
- Subject: Re: DOS environment variables > 128 chars ?
- Message-ID: <1992Aug22.193938.24641@ncsu.edu>
- Originator: dspascha@c00083-100lez.eos.ncsu.edu
- Keywords: environment variable DOS MS-DOS
- Lines: 22
- Sender: news@ncsu.edu (USENET News System)
- Reply-To: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
- Organization: North Carolina State University, Project Eos
- References: <1992Aug22.005943.26092@pasteur.Berkeley.EDU>
- Date: Sat, 22 Aug 1992 19:39:38 GMT
-
-
- Hi. The only reason environment variables are "limited" to 128 characters is
- because of COMMAND.COM's 128-character limitation for command lines, which is
- based on DOS's 128-character limitation for passing command-line parameters to
- child processes. Except for what you mentioned, the only problem I can forsee
- with using too-long environment variables is when you put a line in a batch file
- that references environment variables, such as:
-
- @echo off
- set oldpath=%path%
- path c:\new.dir\to.add\to.path;%path%
- .
- . (do something)
- .
- path %oldpath%
-
- When COMMAND.COM expands lines contining %variable% or %number, any characters
- past the 128th or so are truncated. Thus, you will lose part of your PATH in
- the fragment above!
-
- Tschuess,
- David Paschal
-