Windows: Max environment var length only 1024

  • Anonymous - 2012-02-23


    As a long term user, I've been suffering from a serious bug of Console2:
    Despite the fact that Win Vista/7 have significantly longer string length for environment variables,
    Console keeps using 1024. And this has caused various problems e.g., truncation of %PATH%.

    Can someone find a way to fix it?
    I tried to rebuild Console myself, but I keep getting this missing FreeImagePlus.dll issue even though
    I've had that dll under the exe folder…

  • Kirill

    Kirill - 2012-02-24

    I cannot find 1024 limitation anywhere in Console's code. Could you please provide a scenario that would show 1024 limit?

  • Elven Spellmaker

    For me the limit is 1070 which is a really annoying as I have a lot of things in my path which I need to use.

    I too can't see anything in the code which would be limiting the path so I am quite confused as to what's wrong.

  • Elven Spellmaker

    In normal cmd my full path is shown, it's just inside Console2 that it isn't so unfortunately I don't think the article can't help this problem.

  • Ronald

    Ronald - 2012-09-07

    Is only PATH shortened, or does the limit apply to other environment variables as well?

  • Elven Spellmaker

    Previous message correction: *can

    I've just created a variable TMPVAR and stuck my path in it and it's not being shortened so it's only the PATH variable.

  • Elven Spellmaker

    What is odd is how Console sees it as 1070 characters and not 1023 and cmd sees it as >1070…

  • Maximus5

    Maximus5 - 2012-09-07

    Strange… Cant reproduce the problem in my Windows 7 x64.
    Path var is 2310 chars long on my system
    and cmd.exe, started in Console or ConEmu, shows full variable length.

  • Elven Spellmaker

    How bizzare…

    Are you using a x64 bit build by any chance?

    I wonder if it's the fact I'm using 32bit Console2…

  • Elven Spellmaker


  • Maximus5

    Maximus5 - 2012-09-07

    No. Checked both 32 and 64 bit versions. Works fine.

  • Elven Spellmaker

    That's really bizzare…

    I wonder what is causing this for the OP and me…

  • Elven Spellmaker

    To add to this post, I have recently noticed my path is now working properly (over 1024) characters in console2 too.

    I think the fix was to manually edit my path and just click OK. No idea why *shrugs*.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks