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 slove?:
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 ect. to fit the version installed in UI. The old branch still link agains the old version of thirdparty, and crash
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".
Using the -r command line switch to fix start up errors in the IDE
"C:\Program Files (x86)\Embarcadero\RAD Studio\10.0\bin\bds.exe" -pCBuilder -rfoo
To change your shortcut, right click on the shortcut you use to launch your product (commonly in the start menu), and select Properties. Then select the Shortcut tab and modify the target.
The name you provide after -r is a registry hive. If that registry hive does not exist, the IDE create a brand new registry hive with all the defaults and uses it. Because this takes you back to all the default settings, it fixes most start up problems with the IDE. Note that because custom controls are not part of the defaults, this technique will result in your IDE not having any custom controls you have installed previously. Custom controls are the most common cause of this error, so you will probably want to add any you have one at a time and test.
Your new registry hive will be stored in the registry at HKCU\Software\Embarcadero\name\version. Your current settings for the IDE are stored at HKCU\Software\Embarcadero\BDS\version. You can compare the two registry hives using regedit to see what is different.
Rad Studio XE2 and later also has a -cleanregistryide command line switch which you might find useful. Whereas using -r switch is not destructive, -cleanregistryide is. It will take you back to all the defaults the same as using -r, however it will delete all your current settings. So, if you have a significant investment in your IDE settings, then you my not want to use -cleanregistryide.
Also see: docwiki.embarcadero.com/RADStudio/en/IDE_Command_Line_Switches_and_Options
Source: http://support.embarcadero.com/article/42597
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With