The default environment that DOS uses to hold settings and DOS variables is small–only 256 bytes. Some programs can cause DOS to run out of space in this area by trying to create more variables than there is room for. A long PROMPT or PATH statement will take up more room.
To avoid this, use fewer environment variables, or shorten the PATH statement in AUTOEXEC.BAT. You can Increase the amount of environment space by adding the following line to your CONFIG.SYS file:
SHELL=X:PATHCOMMAND.COM /P /E:NNNN
Here “X:PATH” is the directory where the COMMAND.COM command interpreter is located, and NNNN is the new size of the DOS environment area in bytes.
Suggested is 512 or 1024; don’t make this too large because increasing it reduces available conventional memory.