'How can I restore my Delphi associations without re-installing the IDE?

Today I lost my Delphi-2007 associations; does any way exist to restore my Delphi file associations (.pas, .dpk, etc) without running the installer of Delphi?



Solution 1:[1]

Type assoc /? at a command prompt. This will show you how to associate file extensions with file types.

If the basic registry is not corrupted, you can use assoc *.pas BSD.pasfile to reconnect Delphi 2007 with Pascal source files. Repeat the above with the other file types to reconnect them:

assoc *.dpk BDS.dpkfile
assoc *.dfm BDS.dfmfile

and so forth.

If this is too much work, use the registry repair option in the D2007 installer.

Solution 2:[2]

i will suggest looking for a Repair option in Add/Remove Programs.

i know that the version of Delphi i use has a "Registry only" install to fix per-user issues.

Can also try a System Restore to the point in time before you screwed it up.

Finally you can just manually re-create the associations (Open With...)

Solution 3:[3]

Newer Delphi versions (verified for 10.3+) allow setting IDE file associations through Options -> File Association menu.

You can select all Delphi related or some specific extensions. Don't forget to press Save when closing the dialog to apply extension change.

Note: If you have multiple Delphi versions installed, you can only associate single IDE.

File Association Options Dialog

Solution 4:[4]

Usually quicker than 'Open with':

In Win 7:

Paste into the address field at the top of the window: Control Panel\All Control Panel Items\Default Programs\Set Associations

In XP:

My Computer->Tools->Folder Options-> File Types

Solution 5:[5]

For XE3 Rad Studio use the following .reg file as is. For other versions modify paths accordingly.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ken White
Solution 2 Ian Boyd
Solution 3 Dalija Prasnikar
Solution 4 Vector
Solution 5 asuvoroff