Out of Environment Space Error Message in MS-DOS Programs

ID: Q230205


The information in this article applies to:
  • Microsoft Windows versions 95, 98
  • Microsoft Windows 95 OEM Service Release versions 1, 2, 2.1, 2.5


SYMPTOMS

When you try to run an MS-DOS program in Windows, you may receive the following error message:

Out of environment space.


CAUSE

This issue can occur when you do not have enough memory in the MS-DOS environment to set an environment variable.


RESOLUTION

To resolve this issue, increase the default environment space available for MS-DOS programs. To do this, use one of the following methods:

Modify the Environment for All MS-DOS Programs

To increase the default environment space for all MS-DOS programs running in Windows, edit the Shell command in the Config.sys file. To do this, follow these steps:
  1. Click Start, click Run, type sysedit in the Open box, and then click OK.


  2. Click the Config.sys file, and then type a new Shell command or replace any existing Shell command with the following line


  3. SHELL=<path>\COMMAND.COM /E:4096 /P
    where <path> is the drive letter and path in which the


Modify the Environment for a Specific MS-DOS Program

To increase the default environment space for a specific MS-DOS program, follow these steps:
  1. Right-click the MS-DOS program icon, and then click Properties.


  2. On the Memory tab, type or click the number of kilobytes (KB) the program requires in the Initial Environment box, and then click OK.


  3. NOTE: The maximum amount of memory you can allocate for an MS-DOS program is 4096 KB.

Additional query words:

Keywords : kbenv kberrmsg windos
Version : WINDOWS:95,98
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: May 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.