If you’re attempting to install the Salesforce CLI or other software and encounter the error message “PATH not updated, original length xxxx > 1024”, this typically means that the environment variable PATH
has exceeded the maximum allowed length of 1024 characters. As per eveloper.salesforce.com website, it’s a limitation of the Nullsoft Scriptable Install System (NSIS), which Salesforce CLI uses for its Windows installer. This can prevent applications from updating the PATH
correctly during installation. Here’s how you can identify and resolve this issue.
This error will cause your Visual Studio Code software to not call the Salesforce CLI command interface properly.

Step 1: Understand the PATH Environment Variable
The PATH
environment variable is a system variable that stores a list of directories. These directories are searched when you run a command in the command line. If the PATH
is too long, applications may not be able to update it during installation, leading to errors.
Step 2: Check the Length of Your PATH
To check the length of the PATH
environment variable and identify if it’s too long, open the command prompt by pressing Windows + R
, type cmd
, and pressing Enter or just search for cmd in your start menu).
To view the path variable, enter the following into the Command Prompt:
echo %PATH%
This will display the contents of your PATH
environment variable. While Command Prompt doesn’t show the exact character count, you can copy the output and paste it into a text editor (such as Word) to count the characters. If the length exceeds 1024 characters, it’s too long and may cause the error during installations.
Step 3: Clean Up the PATH Variable
WARNING! This step should be performed by your system admin, updating it incorrectly may be problematic.
To resolve the issue, you need to trim down the PATH
variable by removing redundant or unnecessary entries. Follow the steps below:
Access Environment Variables:
- Right-click on This PC or Computer and select Properties.

- Click on Advanced system settings and go to the Advanced tab.
- Click Environment Variables.

Edit the PATH Variable and remove Redundant or Duplicate Entries
- Review the entries in the
Path
variable and remove any duplicates or unnecessary paths, for example – Multiple entries forC:\Windows\System32
, Repeated paths forC:\Program Files\Git\cmd
. You can also remove paths for old or unused software that no longer requires access to thePATH
.

- If you are installing a tool like the Salesforce CLI, make sure that its installation directory (e.g.,
C:\Program Files\sf\bin
) is included in thePATH
. - Save the changes and close all the windows.
Step 4: Verify the Changes
- Close and reopen the Command Prompt to ensure the updated
PATH
is loaded – go back to the Step 2 on this page. - Type the following command to check if Salesforce CLI is working:
sfdx --version
If you see the version number of the Salesforce CLI, the installation has been successful, and the PATH
issue is resolved.
The “PATH not updated” error occurs when the PATH
environment variable becomes too long for the system to process, preventing new software from updating it correctly. By checking the length of your PATH
and cleaning up unnecessary or duplicate entries, you can resolve this issue and successfully complete installations like Salesforce CLI. Regular maintenance of your PATH
will help prevent similar issues in the future.