Can't edit environment variable over 2047 characters

I am running the latest updated version of Windows 10.

Recent installs have increased the size of my path variable above 2047 characters.

In control panel I get the error "This dialog allows setting variables up to 2047 characters"  when I change the contents of the PATH variable and press the OK button.

How can I change my path since the control panel won't let me?

I have enabled NTFS long path names in the group policy but that did not help.

I saw some posts suggesting that maybe powershell could do it but I am afraid of corrupting my path without a proven script or utility to do it.

AFAIK there is no limit to the path length when you modify it directly in the registry:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path

You must reboot Windows for the change to take effect.

18 people were helped by this reply


Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated September 24, 2020 Views 7,158 Applies to: