Update : Still the same situation with XE8, Rad Studio 10 Seattle, Rad Studio 10.1 Berlin.
The Windows Path environment variable has a limit of 1023 * 2,048 characters, a stupidly short limit in this day and age, and when this limit is exceeded the path is truncated. Why this limit still exists on windows I have no idea.. for that matter why it ever existed... anyway, we're stuck with it (along with it's best buddy, MAX_PATH).
Each version of Delphi adds over 200 characters to your system path. Worst still, they add those 200+ characters to the front of the path, not the end. What happens, is that eventually, important entries get truncated off end of the path, and strange things happen. You will find programs will not run, the task bar displays the wrong icons for programs, even getting to the control panel can be problematic.
If you look at the entries that XE7 added to the start of your path you will see something like this :
C:\Program Files (x86)\Embarcadero\Studio\15.0\bin;
C:\Program Files (x86)\Embarcadero\Studio\15.0\bin64;
Fortunately this can be shortened by the use of junction points. Sadly, this will polute your C: drive with new folders but it's better than the alternative.
The trick is to create links for the most common paths, so on mine I created these
For XE5 and earlier :
mklink /j RS C:\Program Files (x86)\Embarcadero\RAD Studio
mklink /j rspub C:\Users\Public\Documents\RAD Studio
XE6 and above
mklink /j Studio C:\Program Files (x86)\Embarcadero\Studio
mklink /j spub C:\Users\Public\Documents\Embarcadero\Studio
Once you have those junction points, you can then edit your path and replace the long paths, for example (for XE7) :
C:\Program Files (x86)\Embarcadero\Studio\15.0\bin -> C:\Studio\15.0\bin
C:\Program Files (x86)\Embarcadero\Studio\15.0\bin64 -> C:\Studio\15.0\bin64
C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl -> C:\spub\15.0\Bpl
C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64 - > c:\spub\15.0\Bpl\Win64
So for XE7, that cuts it down from 218 to 80 characters, if like me you also have multiple versions of Rad Studio installed, this can be a big saving.
As for Rad Studio, it's extremely rude to add things to the start of the path, the truncation it causes can ruin a machine.. I wasted several hours again today after installing XE7. Embarcadero were told about this issue many times over several releases.. according to the doco, XE7 will popup a message about this.. I didn't see it so not sure when that is supposed to appear, but in any event, if your installer or progam needs to add something to the path environment variable, PLEASE ADD IT TO THE END!! and save us all a bunch of time.
* Correction, max path length is 2048 - very difficult to find a difinitive source of this information on the microsoft site - the max size of an env variable is 2048, however I have seen the path variable truncated at 1024 many times.