Error Installing on Windows About the PATH Not Updated

While installing Salesforce CLI on Windows using the *.exe installer executable, you get the error PATH not updated, original length XX > 1024, where XX is a number greater than 1024.

The error looks something like this:

Windows installer showing an error about the PATH not being updated.

The problem is that your PATH environment variable has a value whose string length is greater than 1024. This limitation isn’t from Salesforce CLI; rather, it’s a limitation of the Nullsoft Scriptable Install System (NSIS), which Salesforce CLI uses for its Windows installer. The installer is checking for the PATH length on your computer to make sure that NSIS fails gracefully and doesn't get into a bad state.

To fix the problem, manually update your PATH variable to be shorter, such as removing unneeded paths. Check your Windows documentation for details.

Be careful updating your PATH variable, especially the one in your System Variables; updating it incorrectly can cause major headaches. Check with your admin, just to be sure.

Warning