I would appreciate your suggestions on the matter of environment variables
whose length exceeds the 128 (127?) character limit.
I have used a utility program (appenv) to construct lengthy environment
variables. In particular, I use a PATH of about 200 characters to allow
easy access to DOS, a set of utilities, several compilers, and some
applications. I know this is longer than Microsoft recommends but I am
not fond of cryptic directory names and am wary of SUBST drive letters.
I do not wish to switch between multiple AUTOEXEC.BAT or CONFIG.SYS files.
Almost all programs work fine under this condition. DOS itself will search
the entire PATH string for .exe files. My SHELL= line in the config.sys
file specifies a total environment space of 1024 bytes and this usually
leaves a comfortable 200-400 bytes to spare. I am using MS-DOS 5.0.
My DOS and Windows applications seem quite happy, except for 1 ...
This particular application uses the Phar Lap 386 DOS extender and won't
shell out to DOS properly if any environment variable is > 128 characters.
At least 1 other Phar Lap 386 DOS extended product is not so limited.
What is the story here? I deplore a 128 character limit and fortunately
found that very few of my applications care.
Must I introduce SUBST drive letters as shorthand for directories? If
so, what are the possible complications?
Is NDOS or 4DOS or xxx superior in this respect?
What might go wrong if I continue to use such a long PATH?
-- Curt Deno
@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
4DOS will allow a command line up to 255 characters.