I have an issue with the %PATH% system environment variable. I get the following error message when I try to change it:
It is in french but translated in english, it would be something like
This environment variable is too large. This dialogue box can only support parameters values up to 2047 characters
I don’t think it’s related to the lenght because of the following fact: if
- I Search for and open “View advanced system settings”;
- Click the “Environment Variables” button;
- Locate “Path” under the System variables section. Click to highlight it;
- Click “Edit”. The “Edit environment variable” modal window pops up;
- Click “OK”. Note that I did no change anything at all, no modification, not even scrolling down the mouse to see the end of the list nor reordering the list;
then I get the error message box. After Step 4 above, I need to Click “Cancel” to be able to exit.
Any idea how to handle this ?
The seoncd reason I think it’s not related to the length is because if
- I perform Step 1 to 4 above
- Click on the button “Change the text”, a new window pops up with the name of the variable “PATH” and its value
- There I can delete some text/path so I have already deleted some duplicated paths in its value but then when I try Step 1 to 5 abobe, the problem is still there.
EDIT 2: Here is value of PATH
C:Program Files (x86)IntelSWToolscompilers_and_libraries_2017.5.267windowsmpiintel64bin;C:Program Files (x86)Common FilesIntelShared Librariesredistintel64_winmpirt;C:Program Files (x86)Common FilesIntelShared Librariesredistia32_winmpirt;C:Program Files (x86)Common FilesIntelShared Librariesredistintel64_wincompiler;C:Program Files (x86)Common FilesIntelShared Librariesredistia32_wincompiler;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.1bin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.1libnvvp;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.0bin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.0libnvvp;C:Program FilesBroadcomBroadcom 802.11 Network Adapter;C:Program FilesMicrosoft MPIBin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv8.0bin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv8.0libnvvp;C:Program Files (x86)CuminasDocument Express DjVu Plug-in;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program FilesWIDCOMMBluetooth Software;C:Program FilesWIDCOMMBluetooth Softwaresyswow64;C:Program Files (x86)Microsoft SQL Server100ToolsBinn;C:Program Files (x86)Microsoft SQL Server100DTSBinn;C:Program Files (x86)ASUSHomeCloudjre7bin;C:Program FilesMATLABR2017aruntimewin64;C:Program FilesMATLABR2017abin;C:Program FilesMicrosoft SQL Server110ToolsBinn;C:Program FilesMicrosoft SQL Server120ToolsBinn;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)Calibre2;C:MinGWbin;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:Program Filesdotnet;C:Program FilesMiKTeX 2.9miktexbinx64;C:WINDOWSSystem32OpenSSH;C:Program FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program FilesGitcmd;C:Program FilesTortoiseGitbin;C:Program FilesPuTTY;C:Program FilesNVIDIA CorporationNsight Compute 2019.3.0
EDIT 3 : OK thanks guys the link was useful. Though it’s weird because I don’t understand why Windows allow to put more than 2047 characters in %PATH% while installing applications and then complaining months later.
Any idea how to handle this ?
Your PATH variable does indeed exceed the 2047 characters that are allowed.
You can trick the system, by creating additional system variables, and then simply include those variables in the PATH variable.
You could also try and shorten any of the paths, that have a space in them, but even that might not be enough. Your best bet is to create new system variables.
Instructions on how to include a system variable in the PATH variable can be found at Environment Variable is too large on Windows 10