Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!hp-pcd!hplsla!davidr From: davidr@hplsla.HP.COM (David M. Reed) Newsgroups: comp.windows.ms Subject: Re: Increasing Environment Space Message-ID: <3130012@hplsla.HP.COM> Date: 10 Jul 90 00:32:52 GMT References: <90183.141937SLVQC@CUNYVM.BITNET> Organization: HP Lake Stevens, WA Lines: 24 Ever since HP started selling MS-DOS it has included a "Personal Application Manager" program (PAM) for starting applications. This is great for non-DOS users who do not want to learn/remember a few simple commands to issue from the DOS prompt. One problem I have had with PAM for years is that no matter how much environment space you reserve on startup (SHELL=COMMAND /E:xxxx), any unused environment appears to be "truncated" (like at the next paragraph boundary after what is used). This has lent itself to the annoying/frustrating "Insufficient environment" messages from BATch files. I find that MSWindow3 is exhibiting the same kind of "wrong" behaviour. Thus I must do what I have done for years with PAM users. In my AUTOEXEC.BAT file I set one or more large variables, e.g. SET X=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Then, one of the first statements in a BATch file is "SET X=". This will clear the "place-holder" variable, freeing up all memory it was reserving. There is no error if X was not previously SET, and it take virtually no additional startup time. Since DOS command lines are limited to 128 characters, if I need a lot of memory reserved I SET several such variables. This seems to work just fine with MSWindows3 and PAM, with only a little extra effort on my part (that I should not have to do, if these programs would not grab "currently unused" environment space that I had reserved in CONFIG.SYS).