MS-DOS 6.22 COMMAND.COM Environment Size
This article explains how to configure the primary environment size
in MS-DOS 6.22 using the COMMAND.COM interpreter. You will
learn the exact command-line parameter required to expand environment
space, the allowed values, and how to apply this setting permanently
using the CONFIG.SYS file to resolve "Out of environment
space" errors.
In MS-DOS 6.22, the parameter used to specify the environment size in
COMMAND.COM is the /E: switch.
Syntax and Parameters
The syntax for setting the environment size is:
COMMAND.COM /E:size
- /E:size specifies the environment size in bytes.
- size must be an integer ranging from 160 to 32,768.
- If you specify a value smaller than 160, MS-DOS defaults to 160 bytes.
- If you specify a value larger than 32,768, MS-DOS defaults to 32,768 bytes.
- The default environment size in MS-DOS 6.22 without this parameter is 256 bytes.
How to Configure the Primary Environment Size
To permanently set the primary environment size for your MS-DOS
system, you must define it in the CONFIG.SYS file using the
SHELL command.
Open
C:\CONFIG.SYSin a text editor like MS-DOS Editor:EDIT C:\CONFIG.SYSLocate or add the
SHELLdirective. Include the/E:switch along with the/P(permanent) switch:SHELL=C:\DOS\COMMAND.COM C:\DOS\ /P /E:1024C:\DOS\COMMAND.COMspecifies the path to the command interpreter.C:\DOS\specifies the directory whereCOMMAND.COMlooks for itself when reloading./Pinstructs DOS to make this instance ofCOMMAND.COMpermanent and to automatically executeAUTOEXEC.BATupon boot./E:1024sets the primary environment size to 1,024 bytes.
Save the file and reboot the computer for the changes to take effect.
Secondary Shell Usage
The /E: parameter can also be used when spawning a
secondary shell from the command line. For example:
COMMAND /E:2048
This opens a new command processor session with 2,048 bytes of
environment space, which remains active until you type EXIT
to return to the parent shell.