Installing Castalia for Delphi as a non-administrator user (updated)

A few days ago, I exchanged emails with someone who was having trouble installing Castalia for Delphi as a non-administrative user. He had found this document that I wrote over 3 years ago, and politely pointed out that the last version referenced there is Delphi 2007, while he was using Delphi XE. Here’s the same document, updated for newer versions of Delphi:

If you’re using Delphi as a non-administrative user on Windows Vista or 7, installing Castalia can be a bit of a pain, because the installer does require administrative rights (because it writes files to Program Files, which is where Windows Vista and 7 want the files to be).

Delphi, on the other hand, loads its settings (including which plugins to load up) from the HKEY_CURRENT_USER registry key, so that’s where Castalia inserts itself.  Of course, when you switch users and open Delphi, it doesn’t read the Administrator’s HKCU, so you’ll have Delphi without Castalia for any other user.

Enabling Castalia for a non-administrative account is pretty simple though.  Off the top of my head, here are steps:

  1. Install Castalia as administrator
  2. Open regedit, and find the appropriate registry key for your version of Delphi (seet he list at the end of this post
  3. Choose file | export and export this key to a file on the hard drive that is accessible to both the administrator and the non-admin user that you are installing Castalia for.
  4. Open the file in notepad, and delete every line that starts with $(DELPHI) or $(BDS).  You should be left with the lines identifying the key, and the lines describing Castalia
  5. Save the file
  6. Switch to the non-admin user, close Delphi if it’s open, and find the file you just created.  Double-click it to import it into the user’s registry.
  7. Start Delphi.  Castalia should install itself and you’re done!

Which registry key to export:

  • Delphi 5: HKCU\Software\Borland\Delphi\5.0\Known IDE Packages
  • Delphi 6: HKCU\Software\Borland\Delphi\6.0\Known IDE Packages
  • Delphi 7: HKCU\Software\Borland\Delphi\7.0\Known IDE Packages
  • Delphi 2005: HKCU\Software\Borland\BDS\3.0\Known IDE Packages
  • Delphi 2006: HKCU\Software\Borland\BDS\4.0\Known IDE Packages
  • Delphi 2007: HKCU\Software\Borland\BDS\5.0\Known IDE Packages
  • Delphi 2009: HKCU\Software\CodeGear\BDS\6.0\Known IDE Packages
  • Delphi 2010: HKCU\Software\CodeGear\BDS\7.0\Known IDE Packages
  • Delphi XE: HKCU\Software\Embarcadero\BDS\8.0\Known IDE Packages

As always, messing with the registry can cause damage to the system if you make a mistake.  Do it at your own risk, your mileage may vary, etc….

One Response to Installing Castalia for Delphi as a non-administrator user (updated)

  1. Paulo Eduardo Neves September 6, 2011 at 5:10 pm #

    The article title had a subtle change from the original version.

    Original → “Installing Castalia for a non-administrator user”
    This one → “Installing Castalia for Delphi as a non-administrator user”

    The original is correct. You installed it as an admin user and want to configure it for a non-admin user.

    I really would like to do the second one: install Castalia as non-admin user. In my current setup, I can write to Program Files, but I’m not an admin. Is it possible?

For programmers, by a programmer

Hi. My name is Jacob, and I'm the creator of Castalia.

I starting programming in 1986, learning Lightspeed Pascal on a Mac Classic. Today, I'm a professional programmer, teacher, and entrepreneur.

I have a Master's Degree in Computer Science, and I still love Pascal and Delphi.

I believe that writing code is the heart and soul of software development, and I love helping programmers write code more effectively.