Command limitation RRS feed

  • Question

  • Win32 limitation for environment variables is 32,767 characters, Command Prompt ignores any environment variables that are inherited from the parent process and are longer than its own limitations of either 2047 or 8191 characters 

    What is the solution for above this limitation ?

    Monday, April 9, 2018 7:03 AM

All replies

  • Hi,

    Thank you for posting here.

    About the window command limitation, you can refer to the following solution.

    To work around the limitation, use one or more of the following methods (as appropriate to your situation):

    1.Modify programs that require long command lines so that they use a file that contains the parameter information, and then include the name of the file in the command line.

    2.Modify programs that use large environment variables so that the environment variables contain less than either 2047 or 8191 characters (as appropriate to your operating system).

    For more information, please refer to this document.

    Note: If you want to know why windows has the limitation, please refer to the website.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, April 10, 2018 6:44 AM