Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!mrsvr!roth From: roth@mrsvr.UUCP (The Unknown Programmer) Newsgroups: comp.sys.ibm.pc Subject: Increasing environment space Summary: Depends on which DOS version! Message-ID: <354@mrsvr.UUCP> Date: 26 Aug 88 14:01:38 GMT References: <1320@number1.step.UUCP> <8324@conexch.UUCP> Organization: GE Medical, MR Center, Milwaukee Lines: 59 > In article <1320@number1.step.UUCP> perl@step.UUCP (Robert Perlberg) writes: > -I just tried adding another directory to my PATH in the autoexec.bat > -file, and when I boot, I get "out of environment space". How can I > -increase the initial allocation of environment space so that the set's > -in my autoexec.bat will succeed? Once again. The method used to increase the environment size depends on the DOS version *AND* the OEM that mucked up the MS-DOS version it used. DOS versions 3.2+ can use the COMMAND.COM argument /E:xxxx to change the environment size. (See other messages for details, or some DOS book or official DOS manual.) *SOME* DOS version 3.1 can also change the environment size, though the size to be sepcified is in different units than for post 3.1. Not all 3.1 versions can change the environment size via "/E:"! The OEM version 3.1 version that came with my system cannot. The environment size for DOS versions that do not accept the /E: argument to COMMAND.COM can still be changed by modifying a couple of bytes in COMMAND.COM that set the environment size. I do not have that information, but it should be noted that some DOS computers are stuck at pre 3.1 versions because the manufacturer created a less-than 100% compatible system. ALSO - not all DOS manuals for 3.1 document the /E: COMMAND.COM argument. (And, as I've said, not all support it. The version of DOS that came with my clone does not support /E: and it is supposed to be DOS 3.1.) Note that creating a *large* environment (without saying what "large" means) can create problems. C programs typically copy the environment onto its stack, and do so for each child task. A "large" environment can blow the stack. Some problems have also been reported when using a second copy of COMMAND.COM on top of a copy that has a "larger" environment - the second copy may not recognize the first copy has a "larger" environment. (For example, escaping to the shell from a communications program.) Dean A. Roth roth@mrsvr.UUCP {rutgers, uwvax} uwmcsd1!mrsvr!roth deanr@lakesys.UUCP {rutgers, uwvax} uwmcsd1!lakesys!deanr P.O. Box 11095 Milwaukee, WI 53211