CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    Ghent - Belgium
    Posts
    2

    Question environment variable PATH

    Hi,

    I'm creating a nightlybuild system for our company and have a problem on the env.var PATH.
    It seems to be that the env.var PATH is limited to 1023 characters after expanding. We are working with some thirdparty packages and I add the directories with the DLL's of these packages to the PATH but this is more than 1023 characters!

    e.g.

    set DotrixDir = "c:\temp"
    set DotrixPath = c:\xerces\....\bin\debug; c:\rogue\...\bin\debug; %DotrixDir% \...\bin\debug;......
    set Path = ....;%DotrixPath%

    becomes after expanding

    Path = ...;c:\xerces\....\bin\debug; c:\rogue\...\bin\debug; c:\temp\...\bin\debug;......


    Does someone knows how to alter the maximum length of a path!



  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125
    This has often been a limitation of using the path variable. There are a couple of options.

    1) use really short path names. NOT SUGGESTED it makes maintanance too hard if the sub-directories are all single letters.

    2) use the subst command to your advantage. if alot of your packagages are under C:\Some Dir\Develop\3rdParty use the following:
    SUBST G: C:\Some Dir\Develop\3rdParty

    You can reallty shorten the path that way

    3) Utilize other environment variables. Often the compiler has variables like INCLUDE;LIB;, etc. If it will search along these lines, leave the information out of the PATH variable.

    If this helps, please rate this message.

  3. #3
    Join Date
    Jun 2002
    Location
    Ghent - Belgium
    Posts
    2

    Thumbs up

    It's very pitty that the PATH length has a maximum length of 1023 (even a registry key value) can have more than 10000 characters.

    The idea of the nightlybuild was that each software developper create a thirdparty package for the other software developpers and one runtime-directory with all thirdparty packages + our own "thirdparty" packages is shared with the others.
    To solve the problem I stored all used dll's in one directory but this is against the filosophy of the idea of our nightlybuild. Maybe i should use the subst-commando.

    Thanx


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured