[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

What is longest possible NT PATH statement?

What is the longest PATH statement possible in Windows NT? When you get the Path env var it seems to always be with short file names.  So at what point do the directory names in the PATH statement get ignored?  It seems to be 512 sometimes and maybe more on other NT boxes, what is the rule? NT workstation differs from server? Details, please.
0
edgaregner
Asked:
edgaregner
  • 4
1 Solution
 
edgaregnerAuthor Commented:
Adjusted points to 75
0
 
edgaregnerAuthor Commented:
MAX_PATH is not the answer. MAX_PATH refers to the maximum size of one name of a file - directory name plus file name.
0
 
allymCommented:
I set my path to C:\1234567890;c:\1234567890........ and finished with c:\1
I filleds the command prompt buffer with 2K worth of path, with only one valid directory at the end, and NT workstation 4.0 SP4 picked up the very last bit of the path.  

So I reckon that the answer is at least 2046 bytes (the exact number of bytes I set).

The control panel applet only allowed me to put 305 bytes in the user PATH.  I didn't disk around with the system PATH here.  You can if you want to.

Of course, this is only the answer for command prompts; maybe you can set the path bigger for applications.  If you have a particular need, then test it as I did.  

0
 
edgaregnerAuthor Commented:
This addresses the PATH statement in a DOS virtual machine and it addresses the PATH statement being set thru the Control Panel Applet.  I will also look at setting the PATH statement programmatically.
0
 
edgaregnerAuthor Commented:
I am beginning to believe that there is no set maximum PATH statement.  There is a maximum environment of which the PATH statement is a part.  The article in the URL below does not explicitly state this but does lead me to this conclusion.

http://support.microsoft.com/support/kb/articles/q223/2/75.asp
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now