Question

My computer crashed recently. We have a Delphi app that takes a lot of work to get running.

One of my co-workers has it all installed still. Is there a way to copy the stuff stored in the palette? And the library paths?

I am using Delphi 5 (I know it is very very very old)

Was it helpful?

Solution

That information is stored in the Registry. I don't know exactly how Delphi 5 does it, but try looking for a key called HKEY_CURRENT_USER\Software\Borland\Delphi\5 or something like that. You'll find all the registration information under that key, including a list of installed packages. You can export the keys to a registry file, copy it to the new computer and install it.

Standard disclaimer: Mucking around in the registry manually can be risky if you don't know what you're doing. Be very careful, and if this solution causes your computer to crash, your house to burn down, or demons to come flying out your nose, it's not my fault.

OTHER TIPS

Try CNWizards which has an export functionality for your IDE settings. You can use the same tool restore them on the new machine. We use it to get the same settings on every development machine. In that way we can ensure that all builds are the same, regardless of who built it.

Based on my experience of having done this a few times(!), the most important registry keys are:

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Known Packages
HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Library

and possibly

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Known IDE Packages

and maybe

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Palette
HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Palette Defaults

So long as you have done a standard D5 installation first.
It's easier/more reliable to let the IDE fill in the other bits as you start using it and you change options as appropriate. Some component packages, eg madExcept, DevExpress etc are often best re-installed using their own installers anyway.

Unless you're going to have multiple users on the same machine using Delphi then the HKLM stuff isn't really all that important - I don't think.

As a related aside - I have learned that a good way to handle this is to build a FinalBuilder script (or similar) to set up my Delphi environment each time I decide to use a new machine/installation. I copy/download/checkout (which can be done in FB too) all package source then use FB to compile it, copy it, create dirs, and fill in the appropriate registry keys etc. I always get a consistent environment and makes it much easier to rebuild individual components or packages as and when they get upgraded too. The items can also be put into the script in 'dependency order' so that you know to re-compile a dependent package if something else changes. I now have a single FB sciprt that builds D5, D2007, D2009, D2010 environments and packages of all my main components, all depending on which compiler(s) I'm interested in which I indicate by a simple variable. Well worth it.

Seems to have just worked for me on a Win 7, SP1 and Delphi 5

Logged as user with Delphi & 3rd party components installed.

registry export hkey current user\software\borland

(no other borland products so selected Borland) rather than Borland\Delphi\5.0)

Logged into pc as new user. Did not start Delphi5 (i.e. never started for this user). Regedit File, Import

Started Delphi all components, including lots of 3rd party, present.

Project compiled as expected under new user.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top