Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I cant make it set a variable. It says out of environment space. Also, how do you access the varible in other programs. Thanks!!!

You gotta enlarge the environment space.
If you want to have more environment space for your day-by-day use, do the following:
1. Right click on the shortcut you use for opening the DOS window under WinME
2. Click on "properties"
3. Go to the "program" tab
4. There should be a field "command line" with the value "C:\WINDOWS\COMMAND.COM" or something similar. Add the string " /e:4096" on the end of that value (notice the space before the string, which will separate the original string from the switch). That will make the environment space on the command prompt to be 4KB. If it's still not enough, increase the number on that /e switch.PS: I'm taking as base Win98SE, trusting that the shortcut layout is similiar in Win98SE and WinME. If an instruction doesn't seem to be possible of accomplishing, look for something similar.
But if the contest is a batch file meant for distribution and which is using too much environment space, it's no good to have each user of the batch script to follow those steps. So, here's a way to enlarge the environment space from the batch file itself:
@echo off
if "%1"=="GoTo" goto %2
%comspec% /e:4096 /c %0 GoTo start
goto eof
:startecho From now to the end of the script,
echo you have 4KB of environment space!:eof
You wrote:
> how do you access the varible in other programsI don't know what you mean by that. The value of a variable is used on the command prompt like %MyVariableName% (that would represent the value of the variable "MyVariableName").
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br___________________________________________________________

in the most higher languages you have a function like GETENV() or OS-ENV()or read it by our self with INT 21h and function 52h

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |