Microsoft KB Archive/84642

{|
 * width="100%"|

MS-DOS-Based Application Runs out of Environment Space

 * }

Q84642

-

The information in this article applies to:


 * Microsoft Windows versions 3.0, 3.0a, 3.1, 3.11

-

SUMMARY
If you receive the error message

not enough environment space

while running or attempting to run an MS-DOS-based application (also known as an MS-DOS virtual machine [VM]) under Microsoft Windows version 3.0 or 3.1, increase the environment space for this application.

MORE INFORMATION
When an MS-DOS-based application is executed, its environment space defaults to the MS-DOS default, which is 256 bytes.

Under Windows 3.0, the only way to increase the environment space in a VM is through the MS-DOS-based application's program information file (PIF). The following is a sample PIF file that does this:

   Field                   Information -                  ---

Program Name           COMMAND.COM Program Title          My Program Optional Parameters    /E:2048 /C C:\MYDIR\MYPROG.EXE Startup Directory      C:\MYDIR &quot;/E:2048&quot; is the size of the environment space in bytes; this value can range from 160 to 32,768.

&quot;MYDIR&quot; is the name of the directory that contains the executable of the program.

&quot;MYPROG.EXE&quot; is the name of the program.

With Windows 3.1, you can either use the above procedure to increase the size of the environment, or you can add the following line to the [NonWindowsApp] section in the SYSTEM.INI file:

  [NonWindowsApp] CommandEnvSize=2048 The above example sets a VM environment size of 2048 bytes. This value can range from 160 to 32,768.

Under Windows 3.1, the Environment size setting in the PIF file will override the CommandEnvSize= setting in the SYSTEM.INI file.

NOTE: The CommandEnvSize= line will automatically be placed in the SYSTEM.INI file when you install Windows 3.1 if there is a SHELL statement in the CONFIG.SYS. If there is no a SHELL statement, you will have to add this line to the SYSTEM.INI file.

Additional query words: 3.00 3.10 non dos err msg win95 sms

Keywords :

Issue type :

Technology : kbWin3xSearch kbWin300 kbWin300a kbWin310 kbWin311