0

just had a crash with an SSD (a days work went missing!) and have had to go back to a HDD.

I have just installed D5 on the HDD and would like to try and find the Library Paths file so I can just copy it all across. There are about 40 Path-entries in it.

Using a USB adapter I searched the SSD for file contents with a fragment of a Path that the file contains but it came up zip.

$(DELPHI)\Lib;$(DELPHI)\Bin;

Can anyone one please point me at where the Library Paths are actually stored?

Thank you.

ollo
  • 24,797
  • 14
  • 106
  • 155
user2373289
  • 51
  • 1
  • 2
  • 5
  • If I remember it correctly, the Library Paths are stored in the Windows registry along with other Delphi settings. – nullptr May 15 '13 at 21:23
  • For future reference it's not a bad idea to export and SAVE Your registry settings to a file which you then back up. Too late now! I keep a file called libpaths.txt in my source code repo that contains reference versions of these library paths. – Warren P May 16 '13 at 01:09

2 Answers2

1

There is no "Library Paths file".

The $(DELPHI) part of what you quoted refers to your Delphi installation root (base) folder, which in the case of Delphi 5 defaults to C:\Program Files\Borland\Delphi5, so the $(DELPHI)\Lib folder would be C:\Program Files\Borland\Delphi5\Lib.

This path information is configured when you install Delphi, and is stored in the Windows Registry in HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\RootDir for Delphi 5.

The "about 40 paths" probably refers to what you've configured in Tools->Environment Options->Library->Library Path; that information is also saved in the Windows Registry. If you can't boot Windows from the SSD drive, you're out of luck; you need to start Windows and then use RegEdit to export that key from the registry in order to recover that information. You'll need to reinstall your third-party components, I'm afraid.

Ken White
  • 123,280
  • 14
  • 225
  • 444
0

Further to Ken's answer, if the SSD is readable and mounted as an additional drive you can get the registry settings: DISCLAIMER: This is mainly from memory, but I have done this in a similar situation.

  • Copy NTUSER.DAT from (SSD):\Users\<username> to a "safe place". You will have to uncheck the "Hide protected operating system files" option from Explorer Folder Options, or use the command line for this.
  • Run regedit. Select the HKEY_USERS key, the use File -> Load Hive and select the NTUSER.dat file uou copied from the old drive.
  • Hopefully this will load your registry settings from the old computer into a new key under HKEY_USERS
  • Find Software\Borland\Delphi\5.0\ in the new hive, then export whatever subkeys you need to a .reg file
  • Tweak the exported file(s) - you will need to change the key names to HKEY_CURRENT_USER\Software\Borland\Delphi...\*
  • Unload the registry hive
  • Backup your existing HKEY_CURRENT_USER\Software\Borland\Delphi reg key
  • Check then import the tweaked registry file

This is almost a question for SuperUser!

Gerry Coll
  • 5,867
  • 1
  • 27
  • 36