Max Capacity of Windows 2000 PATH variable 
Author Message
 Max Capacity of Windows 2000 PATH variable

Hello Everybody,

My apologies if the subject of this post seems inappropriate for this
group, but I've tried to post it on various Windows forums and have
received no responses (at all). If you know of the (more) appropriate
forum, please let me know. The problem did arise, though, in the
course of my using IBM Object Rexx.

I have tried to add another directory to the Windows 2000 PATH
definition (through the System Environment variable menu), but have
found that, when a new CMD window is opened, that the PATH
variable's contents seem to be cut off at 1023 characters.

However, I can set the PATH variable, through IBM ObjectRexx, to a
character string greater than 1023.

Is there a limitation on Windows 2000 to the number of characters
which can be assigned to a PATH variable's definition through the
System Environment variable menu ?

-- Chuck Moore



Sat, 04 Dec 2004 07:34:40 GMT  
 Max Capacity of Windows 2000 PATH variable

Quote:

> Is there a limitation on Windows 2000 to the number of characters
> which can be assigned to a PATH variable's definition through the
> System Environment variable menu ?

That number sounds Oh so much like the OS/2 limit, yes?? Well, guess
some things have not changed since OS/2 and NT split. Even if Rexx can
set you a longer one for one session, that dialog is the update to the
registry which takes affect each time you boot, so you are stuck to what
it feels like doing.

You might check the NT Reg Hacks web site as well:

http://www.jsiinc.com/reghack.htm

--
Michael Lueck
Lueck Data Systems

Remove the upper case letters NOSPAM to contact me directly.



Sat, 04 Dec 2004 18:36:35 GMT  
 Max Capacity of Windows 2000 PATH variable
One more URL

http://www.jsiinc.com/subd/tip1900/rh1907.htm

--
Michael Lueck
Lueck Data Systems

Remove the upper case letters NOSPAM to contact me directly.



Sat, 04 Dec 2004 18:38:16 GMT  
 Max Capacity of Windows 2000 PATH variable
Michael,

Thanks for the quick reply to my note.

Well, it certainly looks as if I'll have to come up with some other way
of specifying/installing programs on my mini-mainframe-workstation.
I've got a bunch of packages installed and I would expect to install
even more in the future.

Do you have any suggestions on how I might get around this (if you
wish, I'll take this subject to the Windows JSI forum) ?

-- Chuck Moore


Quote:

>One more URL

>http://www.jsiinc.com/subd/tip1900/rh1907.htm

>--
>Michael Lueck
>Lueck Data Systems

>Remove the upper case letters NOSPAM to contact me directly.



Sun, 05 Dec 2004 00:47:40 GMT  
 Max Capacity of Windows 2000 PATH variable


Quote:
> Michael,

> Thanks for the quick reply to my note.

> Well, it certainly looks as if I'll have to come up with some
> other way of specifying/installing programs on my
> mini-mainframe-workstation. I've got a bunch of packages
> installed and I would expect to install even more in the future.

> Do you have any suggestions on how I might get around this (if
> you wish, I'll take this subject to the Windows JSI forum) ?

Kludgy but you might start some applications via a batch file that
first sets a PATH and then "START"s the program.  


Sun, 05 Dec 2004 05:10:18 GMT  
 Max Capacity of Windows 2000 PATH variable
|> Thanks for the quick reply to my note.
|>
|> Well, it certainly looks as if I'll have to come up with some
|> other way of specifying/installing programs on my
|> mini-mainframe-workstation. I've got a bunch of packages
|> installed and I would expect to install even more in the future.
|>
|> Do you have any suggestions on how I might get around this (if
|> you wish, I'll take this subject to the Windows JSI forum) ?
|>
|
| Kludgy but you might start some applications via a batch file that
| first sets a PATH and then "START"s the program.

I don't know much about Windows/2000, but it it's anything like Windows/9x
(for compatability or whatever ...), defining (or setting) the PATH
defines (sets) a DOS Environmental Variable, and the number of bytes available
to SET a DOS EnvVar is limited.  You may be running out of EnvVar space  (or
whatever you want to call it). ___________________________________ Gerard S.



Sun, 05 Dec 2004 05:42:40 GMT  
 Max Capacity of Windows 2000 PATH variable

Quote:

> I don't know much about Windows/2000, but it it's anything like Windows/9x
> (for compatability or whatever ...), defining (or setting) the PATH
> defines (sets) a DOS Environmental Variable, and the number of bytes available
> to SET a DOS EnvVar is limited.  You may be running out of EnvVar space  (or
> whatever you want to call it). ___________________________________ Gerard S.

Nope, this is just a limitaton that was brought with from the OS/2 code.
There is no EnvVar space as such exists in DOS in the NT code. As well
it also acts like OS/2 in that updating a var does not affect other
sessions or sessions started after the update to the var.

--
Michael Lueck
Lueck Data Systems

Remove the upper case letters NOSPAM to contact me directly.



Sun, 05 Dec 2004 06:23:00 GMT  
 Max Capacity of Windows 2000 PATH variable

Quote:

> Michael,

> Thanks for the quick reply to my note.

> Well, it certainly looks as if I'll have to come up with some other way
> of specifying/installing programs on my mini-mainframe-workstation.
> I've got a bunch of packages installed and I would expect to install
> even more in the future.

> Do you have any suggestions on how I might get around this (if you
> wish, I'll take this subject to the Windows JSI forum) ?

Shorter directory names? Not very nice but might help.

What about having a basic short PATH and when you need to run another
program use a batch file that adds the necessary paths. Surely it's
unlikely that you'll need access to everything at the same time?

--
Jim Backus



Mon, 06 Dec 2004 03:03:11 GMT  
 Max Capacity of Windows 2000 PATH variable
Hello All (Jim, Mark, Gerard, Michael),

I appreciate the advice and I've been thinking it over. I'm going to get wordy in my following thoughts. I
apologize to anyone that finds this note oversize, but I want to accurately summarize why I brought up the
topic
as well as mention what I'll try next. I would think that this problem will/has been encountered by others
(especially anyone trying to consolidate servers).

The reason I had been adding all software packages/directories in the PATH definition was a result of
several
thoughts:
1) I wanted a setup that would allow/cause programs/batch-files to search/function in batch the same as
was
done from a CMD.exe window, or Programs-Menu invocation.
2) I wouldn't have to care which, of the production packages, was being used by another
program/batch-file. I
had been looking to when many of my batch-files/programs would call other batch files (or programs) as
required by a run-time decision.
3) Finding things dynamically: not so much for data files (although HELP files and others may need to be
found
through the PATH) whose location I tend to know very precisely, but for programs/batch-files.

Some notes:
1) The workstation I'm doing all this on is a single-user-workstation-combination-server. It is my home
system
and I don't-want-to/can't acquire another machine to segregate workstationa and server functions.
2) I have gotten in the habit of creating a unique System Environment variable to describe the home
directory of
each software package I install. I have found that, for me, such a procedure makes my overall maintenance
easier by changing the PATH definition from ".;L:/ABC/def/geh/aaa.exe;D:/JKL/mno/ppp.exe;..." to
".;%ObjRexx%;%PLI%;%WINNT%;...". Performance issues (?) aside, It seemed like a more structured way to
install (lots of) packages.
3) For Program-Menu invocation, many, if not most, packages/programs have as their 'initial directory' the
install(ed) directory for that package/program. And, many packages/programs also put their install(ed)
directory
into the PATH. That is, for many packages/programs the 'current' directory is as relevant for finding
something
as is whatever is in the PATH. Thus, only a relatively few packages/programs may need to be on the PATH
definition as set through ControlPanel>System>Environment.
4) I just verified on another WinNT 4/SP5 system that one can create, in a CMD/MS-DOS window, a PATH
definition greater (1681 characters) than 1024. Hmmmmm. Can the same thing be done in Win2K ?

So, what's next: I'll look into creating a BatchJob (ObjRexx) program that:
1) takes the system PATH
2) creates a list of all other product environment variables (i.e. not LIB, TMP or somesuch)
3) searches the PATH for a match
4) prepends the product environment variable's value to the PATH if no match
5) resets the final PATH value
6) launches the desired program

This scheme may eat up some cycles, and it gets away from having interactive and batch environments be
the
same, but I think that it may be my only recourse.

Thanks again for your patience,
-- Chuck Moore

*************************************************************************************************************

Quote:


>> Michael,

>> Thanks for the quick reply to my note.

>> Well, it certainly looks as if I'll have to come up with some other way
>> of specifying/installing programs on my mini-mainframe-workstation.
>> I've got a bunch of packages installed and I would expect to install
>> even more in the future.

>> Do you have any suggestions on how I might get around this (if you
>> wish, I'll take this subject to the Windows JSI forum) ?

>Shorter directory names? Not very nice but might help.

>What about having a basic short PATH and when you need to run another
>program use a batch file that adds the necessary paths. Surely it's
>unlikely that you'll need access to everything at the same time?

>--
>Jim Backus



Mon, 06 Dec 2004 07:08:47 GMT  
 Max Capacity of Windows 2000 PATH variable
Quote:
> There is no EnvVar space as such exists in DOS in the NT code.

This statement is contradicted by MS KB article Q158141.


Quote:

> > I don't know much about Windows/2000, but it it's anything like
Windows/9x
> > (for compatability or whatever ...), defining (or setting) the PATH
> > defines (sets) a DOS Environmental Variable, and the number of bytes
available
> > to SET a DOS EnvVar is limited.  You may be running out of EnvVar space
(or
> > whatever you want to call it). ___________________________________
Gerard S.

> Nope, this is just a limitaton that was brought with from the OS/2 code.
> There is no EnvVar space as such exists in DOS in the NT code. As well
> it also acts like OS/2 in that updating a var does not affect other
> sessions or sessions started after the update to the var.

> --
> Michael Lueck
> Lueck Data Systems

> Remove the upper case letters NOSPAM to contact me directly.



Tue, 07 Dec 2004 15:27:01 GMT  
 Max Capacity of Windows 2000 PATH variable
The documented limit for PATH is 1024 chars. This applies not only to the
system and user variables separately, but also to the concatenated result
after expansion of embedded %var% environment variables.

Under NT4 it was possible to define a longer variable using the control
panel applet, but the extra characters were ignored or led to a crash in a
nested cmd.exe (that bug was fixed in a post-FP6 hotfix available on
request). W2K enforces the limit in the control panel applet.

The maximum total space for all environment variables is configurable up to
32768 bytes; MS KB article Q158141 explains how to configure it.


Quote:
> Hello Everybody,

> My apologies if the subject of this post seems inappropriate for this
> group, but I've tried to post it on various Windows forums and have
> received no responses (at all). If you know of the (more) appropriate
> forum, please let me know. The problem did arise, though, in the
> course of my using IBM Object Rexx.

> I have tried to add another directory to the Windows 2000 PATH
> definition (through the System Environment variable menu), but have
> found that, when a new CMD window is opened, that the PATH
> variable's contents seem to be cut off at 1023 characters.

> However, I can set the PATH variable, through IBM ObjectRexx, to a
> character string greater than 1023.

> Is there a limitation on Windows 2000 to the number of characters
> which can be assigned to a PATH variable's definition through the
> System Environment variable menu ?

> -- Chuck Moore



Tue, 07 Dec 2004 15:29:20 GMT  
 Max Capacity of Windows 2000 PATH variable
Mark,

Thanks very much for the patience and assist !  

I wasn't able to access the article through the net (the link
ftp://ftp.microsoft.com/bussys/winnt/kb/q158/1/41.txt seems to be
broken), but I'm sure that I can find it elsewhere.

Thanks again,
-- Chuck Moore


Quote:

>The documented limit for PATH is 1024 chars. This applies not only
to the
>system and user variables separately, but also to the concatenated
result
>after expansion of embedded %var% environment variables.

>Under NT4 it was possible to define a longer variable using the
control
>panel applet, but the extra characters were ignored or led to a crash
in a
>nested cmd.exe (that bug was fixed in a post-FP6 hotfix available on
>request). W2K enforces the limit in the control panel applet.

>The maximum total space for all environment variables is configurable
up to
>32768 bytes; MS KB article Q158141 explains how to configure it.



>> Hello Everybody,

>> My apologies if the subject of this post seems inappropriate for this
>> group, but I've tried to post it on various Windows forums and have
>> received no responses (at all). If you know of the (more) appropriate
>> forum, please let me know. The problem did arise, though, in the
>> course of my using IBM Object Rexx.

>> I have tried to add another directory to the Windows 2000 PATH
>> definition (through the System Environment variable menu), but
have
>> found that, when a new CMD window is opened, that the PATH
>> variable's contents seem to be cut off at 1023 characters.

>> However, I can set the PATH variable, through IBM ObjectRexx, to a
>> character string greater than 1023.

>> Is there a limitation on Windows 2000 to the number of characters
>> which can be assigned to a PATH variable's definition through the
>> System Environment variable menu ?

>> -- Chuck Moore



Tue, 07 Dec 2004 23:48:31 GMT  
 Max Capacity of Windows 2000 PATH variable
Where did you get that URL? Try:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q158141

(The usual way to find a KB article is from the search page - e.g.
http://support.microsoft.com/default.aspx?scid=fh;EN-US;kbinfo)


Quote:
> Mark,

> Thanks very much for the patience and assist !

> I wasn't able to access the article through the net (the link
> ftp://ftp.microsoft.com/bussys/winnt/kb/q158/1/41.txt seems to be
> broken), but I'm sure that I can find it elsewhere.

> Thanks again,
> -- Chuck Moore


> >The documented limit for PATH is 1024 chars. This applies not only
> to the
> >system and user variables separately, but also to the concatenated
> result
> >after expansion of embedded %var% environment variables.

> >Under NT4 it was possible to define a longer variable using the
> control
> >panel applet, but the extra characters were ignored or led to a crash
> in a
> >nested cmd.exe (that bug was fixed in a post-FP6 hotfix available on
> >request). W2K enforces the limit in the control panel applet.

> >The maximum total space for all environment variables is configurable
> up to
> >32768 bytes; MS KB article Q158141 explains how to configure it.



> >> Hello Everybody,

> >> My apologies if the subject of this post seems inappropriate for this
> >> group, but I've tried to post it on various Windows forums and have
> >> received no responses (at all). If you know of the (more) appropriate
> >> forum, please let me know. The problem did arise, though, in the
> >> course of my using IBM Object Rexx.

> >> I have tried to add another directory to the Windows 2000 PATH
> >> definition (through the System Environment variable menu), but
> have
> >> found that, when a new CMD window is opened, that the PATH
> >> variable's contents seem to be cut off at 1023 characters.

> >> However, I can set the PATH variable, through IBM ObjectRexx, to a
> >> character string greater than 1023.

> >> Is there a limitation on Windows 2000 to the number of characters
> >> which can be assigned to a PATH variable's definition through the
> >> System Environment variable menu ?

> >> -- Chuck Moore



Thu, 09 Dec 2004 15:54:08 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. path in windows ME, 2000,...

2. checking os.path.islink for windows Nt and 2000

3. Tcl path problem in Cygwin&Windows 2000

4. Environment variables in Windows 2000

5. QuickDDE, Word 2000 & Windows 2000

6. Max Connections to Win NT workstation / Win 2000 pro

7. Programmatically setting PATH environment variable in Windows NT

8. Variable value holding capacity

9. Exceeding Variable Capacity?

10. Problem with exceeding variable capacity?

11. Moving from Windows 98 to Windows 2000

12. Clarion for Windows and Windows 2000

 

 
Powered by phpBB® Forum Software