Forwarding my answer from here :
I ran into this problem. For me, this is because my Windows PATH variable has moved more than 2047 characters. This also violated the% windir% path extension, so I could not change my PATH variable by going to Computer → Properties → Advanced → Environment Variables. The solution was to change my system PATH variable by going to C: \ Windows \ system32 \ and running systempropertiesadvanced.exe, copying the System PATH variable, pasting it into your text editor of your choice, divide it by a semicolon, sort alphabetically delete duplicates and other unnecessary paths until I get below 2047 characters, return all lines with a semicolon and paste it back into your System PATH variable. For more information, see.
source share