Search code examples
delphidelphi-2007

Starting Delphi with an alternate registry key


I found this documentation that indicates you can start Delphi with an alternate registry key. But I can't get it to work (using Delphi 2007, also tried 2010). The target of my shortcut is

"C:\Program Files\CodeGear\RAD Studio\5.0\bin\bds.exe" -pDelphi -rHKEY_CURRENT_USER\Software\Borland\BDS\5.0

When I run that Delphi starts up with no packages loaded. Am I passing the key in a wrong way? Is this a feature not in 2007/2010? (it seems to be there, since the packages normally loaded on startup are not loaded)

What am I trying to solve?:

I have different release brances using different versions of thirdparty components. When I need to fix a bug on an old branch, the UI (running with a later thirdparty version) change the dfm, uses section etc. to fit the version installed in the UI. The old branch still links against the old version of thirdparty, and crash


Solution

  • Yes, you are using the r parameter with a wrong value. The default value is "BDS" and the resulting key is "HKEY_CURRENT_USER\Software\Borland\BDS\5.0" (for D2007). If you specify another value like "MyKey" it will use the key "HKEY_CURRENT_USER\Software\Borland\MyKey\5.0".