Printer Version | Table of Contents | Project Home Page |
"OUT OF ENVIRONMENT SPACE"
When you shell out to a DOS box under Windows, the size of the DOS environment is normally limited to the amount actually in use by DOS at the time when you first started Windows (rounded up to multiples of 16). This does not give a subprocess any free space that it can use for its own purposes, so when it tries to set an environment variable, you get the "out of environment space" message. This is a problem that may affect any process that runs in a "DOS box" under Windows, and sets an environment variable.How to do it under NT, Windows2000, XP
/V will not work under NT, Windows2000, or XP. see TOPIC Problem - /V Does Not Work Under NT, Windows2000, XPHow to do it under Win95
Select the shortcut icon that you use to start MS-DOS. Rhex ight-click on it. When the pop-up menu appears, click on PROPERTIES. When the properties for the shortcut come up, click on the MEMORY tab. When the tab sheet is displayed, set a value for INTITIAL ENVIRONMENT. I usually set it to 2048 (that is, 2K) bytes. This will ensure that when DOS (COMMAND.COM) is started, 2K bytes are allocated to the environment.Windows 3.1
The trick to giving yourself a decent amount of environment space in a Windows DOS box, is to edit SYSTEM.INI and put the following line in the [NonWindowsApp] section:DOS or Windows 3.0 and earlier
An alternative technique, if you're running Windows 3.0 or earlier, is always to start Windows from a batch file that contains the following line, executed BEFORE you start Windows:Using 4Dos, NDOS, And UMB
Aran Spence has reported circumstances in which Fdate /V will not set a variable in the master environment. This report leads me to believe that Fdate /V may also fail to work with MS-DOS if you put the command processor or the environment in Upper Memory.ERROR @echo ERROR: Master environment not found @pauseIf you have a 4DOS.INI file, it has to contain these lines for Fdate /V to work:
UMBEnvironment = No UMBLoad = NoIf you have NDOS, the SHELL statement in CONFIG.SYS cannot contain any reference to UMB loading via /U (which puts NDOS.COM in UMB), nor can it contain a statement of the form:
/E:xxxU(which puts xxx bytes of the environment in UMB via the "U" parameter).
SET NDSHELL=/e+xxxU /Uin which both U's represent UMB loading of the command processor and the environment during secondary shells.