[comp.os.msdos.desqview] HELP! Environment size trouble

geoffw@xenitec.on.ca (Geoffrey Welsh) (06/14/91)

   The first line of my CONFIG.SYS file reads:

SHELL=C:\DOS\COMMAND.COM /e:384 /p

 ... but DesqView opens each window with a 160 byte environment!

   Help!  I *need* larger environments!

   Thanks.

valley@gsbsun.uchicago.edu (Doug Dougherty) (06/17/91)

geoffw@xenitec.on.ca (Geoffrey Welsh) writes:


>   The first line of my CONFIG.SYS file reads:

>SHELL=C:\DOS\COMMAND.COM /e:384 /p

> ... but DesqView opens each window with a 160 byte environment!

>   Help!  I *need* larger environments!

The SHELL= thing only affects the lowest level COMMAND.COM, that is, the
one loaded at boot time.  You need to patch your copy of COMMAND.COM
(e.g., with DEBUG) to make the default environment size bigger.  The
magic location varies with version of DOS; in 3.3 (where I personally
discovered it, since that's the version I use), it is EB8h.
--

	(Another fine mess brought to you by valley@gsbsun.uchicago.edu)

a_rubin@dsg4.dse.beckman.com (Arthur Rubin) (06/17/91)

In <1991Jun14.050659.9362@xenitec.on.ca> geoffw@xenitec.on.ca (Geoffrey Welsh) writes:


>   The first line of my CONFIG.SYS file reads:
>SHELL=C:\DOS\COMMAND.COM /e:384 /p
> ... but DesqView opens each window with a 160 byte environment!
>   Help!  I *need* larger environments!
>   Thanks.

I think this is probably a DOS rather than a DV problem.  If a program
(including COMMAND.COM) runs another program, the new program's environment
shrinks to 160 bytes or the current environment size, whichever is less.

That being said, I have my 1K environment available in MY DV windows.  How?  I'm
not sure, but I have Program c:\dv_set, which is a batch file.  It works for me.

--
2165888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
a_rubin@dsg4.dse.beckman.com (work)
My opinions are my own, and do not represent those of my employer.

mstr@vipunen.hut.fi (Markus Strand) (06/18/91)

In article <1991Jun17.135703.15410@midway.uchicago.edu> valley@gsbsun.uchicago.edu (Doug Dougherty) writes:

>The SHELL= thing only affects the lowest level COMMAND.COM, that is, the
>one loaded at boot time.  You need to patch your copy of COMMAND.COM
>(e.g., with DEBUG) to make the default environment size bigger.  The
>magic location varies with version of DOS; in 3.3 (where I personally
>discovered it, since that's the version I use), it is EB8h.

You can also use dummy variables to eat up space.

SET FOO=BARBARBARBARBARBARBARBRABRABABABABBBBBARABABARBRAB
SET BAR=FOOFOFOFOFOFOFOOOOFOOFOFOOFFFFOOOOOFOFOOFOOOFOFOFO

When you need space in you just say:

set foo=
set I_need_a_varable=something


Markus Strand
Markus.Strand@hut.fi

geoffw@xenitec.on.ca (Geoffrey Welsh) (06/19/91)

In article <1991Jun17.135703.15410@midway.uchicago.edu> valley@gsbsun.uchicago.edu (Doug Dougherty) writes:
>The SHELL= thing only affects the lowest level COMMAND.COM, that is, the
>one loaded at boot time.  You need to patch your copy of COMMAND.COM
>(e.g., with DEBUG) to make the default environment size bigger.  The
>magic location varies with version of DOS; in 3.3 (where I personally
>discovered it, since that's the version I use), it is EB8h.

   Thanks... I received a few messages from helpful people, many
of whom suggested (my current solution) putting COMMAND /E:<n>
in the DV program description, but patching COMMAND.COM seems by
far the best approach.

   I'm off to find the magic location in Compaq DOS 3.31...

mlord@bwdls58.bnr.ca (Mark Lord) (06/20/91)

<>   The first line of my CONFIG.SYS file reads:
<>SHELL=C:\DOS\COMMAND.COM /e:384 /p
<> ... but DesqView opens each window with a 160 byte environment!
<>   Help!  I *need* larger environments!

No problem.  Just go into the "Change Program" screen for the "BIG DOS"
window (or whatever menu item you are using to open these DOS windows)
and edit the program line to include the /e:384 parameter.

Ie.  C:\DOS\COMMAND.COM /e:384
-- 
MLORD@BNR.CA  Ottawa, Ontario *** Personal views only ***
begin 644 NOTSHARE.COM ; Free DOS 4.xx utility - use instead of SHARE.EXE
MZQ.0@/P/=`J`_!9T!2[_+H``L/_/+HX&+`"T2<TAO@,!OX0`N1(`C,B.P/.DS
<^K@A-<TAB1Z``(P&@@"ZA`"X(27-(?NZE@#-)P#-5
``
end

davidr@hplsla.HP.COM (David M. Reed) (06/22/91)

There are a couple of "tricks" I have used.  If the window I will open
in DESQview can be started with a BATch file, then I use the "reserve
space" method.  This means that I have declared in AUTOEXEC.BAT something like

SET XX=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Then, at the beginning of the BATch file I run in DESQview I have the
statement

SET XX=

which will clear that space occupied by the XX environment variable.  If I
have needed a LOT of space I have defined several of these (eg. XX, XY, XZ)
since a DOS command line cannot be longer than 127 characters (each variable
therefore able to "reserve" about 120 characters).

Alternatively, specify in  DESQview Change Program something like:

    Program:     COMMAND.COM
    Parameters:  /E:1024 /C real_program_name

This problem also occurs with MSWindows (and some "menuing" programs).
That is, that a new "DOS shell" only gets for environment space that
which is currently being actually used as environment space, apparently
rounded up to the next paragraph (with a minimum of 160 bytes).