Is there a way to override the 1024 char limit size on environment variables on win2000 ?

  • Thread starter Thread starter Anthony Lichnewsky
  • Start date Start date
A

Anthony Lichnewsky

Hi everybody,
I just wanted to know if one can specify a new limit for environment
variable size, so that it's not truncated without you being aware of
it.

(I tried the setx program, and to map files with large name to drive
letters or to use the short equivalent filenames
(C:\progra~1\micros~1.net\ ...), but I don't see it as an acceptable
solution for software installation).

I assume this issue also exists on winXP/winnt ...
Is there a clean way to it ?

Anthony Lichnewsky
 
This article was previously published under Q161564
SUMMARY
Some MS-DOS applications may require specific allocations of environment space.
In some cases, it may be desired to trim or expand this resource for
troubleshooting purposes. Microsoft Windows NT version 4.0 allows for this
setting to be customized.
MORE INFORMATION
The environment size for a single application may be adjusted via the desktop or
via the Config.nt file.

To adjust via the desktop:
1.. Right-click on the application shortcut.
2.. Examine the properties for the shortcut and select the Memory tab.
3.. Type or select a value from the list if you wish to customize this
setting. (The initial environment setting is set to AUTO by default. The value
of AUTO causes the operating system to refer to the SHELL= line in the Config.nt
file, if it exists.)
To adjust via the Config.nt file:

NOTE: Editing the Config.nt will change the default environment size.
1.. To use a specific Config.xx file for an application, specify the file to
use by going to the Program tab of the shortcut's properties and clicking on the
Windows NT button.
2.. Edit or create the SHELL= line in the Config.nt file accordingly. For
example, to create an environment size of 512 bytes, the following may be used:

shell=%systemroot%\system32\command.com /e:512

The default environment size is 256 bytes, with a maximum possible size of 32
KB.
 
I am sorry if my question wasn't that clear.
I am not speaking of environment overall space.

My question was :
"how can I change the max size allowed per system enviromnent variable?"

any of those environment variables(Ex : %path% or %lib% ) is truncated
at 1024 characters.
 
Anthony Lichnewsky said:
I am sorry if my question wasn't that clear.
I am not speaking of environment overall space.
My question was :
"how can I change the max size allowed per system enviromnent variable?"
any of those environment variables(Ex : %path% or %lib% ) is truncated
at 1024 characters.

You can't. That limit is fixed. You'll have to find some way to make
your variables shorter.
 
The SUBST command is good way to replace a long path to a drive letter.

Example:

subst j: C:\Program Files\Common Files\Network Associates\Engine

The above can be inserted into the Registry HKLM Run entry.

Dave
 
Back
Top