This present an issue when you have installed a bunch of software, each one adding is own items to the path variable. A some point, the path becomes too long and strange things happens such as control panel applet not working anymore.
This happened to me when installing Delphi XE5 on a system which already had a lot of software, including 6 other Delphi versions.
Actually, the solution is simple. Three steps:
- Remove the items installed by the application from the path
- Create a batch file adding the items back to the path and launch the application
- Change the shortcut (Desktop and Start Menu) to run your batch instead of the application.
ECHO Starting Delphi XE5
SET RSBIN=D:\Program Files (x86)\Embarcadero\RAD Studio\12.0
SET RSBPL=C:\Users\Public\Documents\RAD Studio\12.0\Bpl
PATH | FIND /I "%RSBIN%"
IF ERRORLEVEL 1 PATH=%RSBIN%\bin;%RSBPL%;%RSBIN%\bin64;%RSBPL%\Win64;%PATH%
START /D "%RSBIN%\bin" bds.exe %1
Please note that the paths in this batch reflect my own installation: Delphi is on D: driver and common files on C: drive. You must adapt this to your own setup!
The batch is almost the same for X2, XE3, XE4 and XE5. Just change the version number form 12.0 for XE5 down to 9.0 for XE2.
Before XE2, the batch is a little bit different because there was no win64 compiler. The arts with win64 and bin64 must be removed. At some point in the past, Embarcadero directory was CodeGear and even before it was Borland. The executable file is bds.exe for most versions, but it was Delphi32.exe for Delphi 7 and earlier. All in all, just have a look at your path variable and reproduce what you see.
Follow me on Twitter
Follow me on LinkedIn
Follow me on Google+
Visit my website: http://www.overbyte.be