Where is the Default Program associations stored in the registry?
Should be in:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes
and HKCU\SOFTWARE\Classes
And I don't believe that this has changed recently.
The priority is for current user, then local machine (aliased I believe to classes root).
Explorer uses a different set of registry keys that can be found at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\
![Jim McKeeth](https://i.stack.imgur.com/4EvgY.jpg?s=256&g=1)
Jim McKeeth
Lead World Wide Developer Evangelist for Embarcadero Technologies Invented and patented swipe to unlock in 2000. See US Patent # 8352745 & 6766456, and others. Host of the Podcast at Delphi.org. (mostly a blog, but some podcast episodes). Preferred Languages: Delphi / Object Pascal C# / .NET JavaScript Java C++ Objective-C
Updated on September 18, 2022Comments
-
Jim McKeeth almost 2 years
If I run the
assoc
command-line utility for an extension, it shows the file type/description for the extension I set in the registry. But if I go to Control Panel -> Default Programs - Set Associations then I see a different description and default program.It used to be that setting the two keys:
HKCR\.ext
(default) = Identifier- Identifier (default) = "File Description"
- \DefaultIcon (default) = Some icon
- \Shell\Open\Command (default) = Some editor
But now it appears there is an override elsewhere, which is what gets displayed in the Default Programs listing.
My question is, where i this overridden association information stored? I'm assuming it is in the registry, but I don't see it in the keys I expect it to be. I believe this was changed in the Vista time frame, but it may have been in XP too.
Update: Since there is some confusion, do the following test. Rename a file to some new extension. Create an association in the registry keys mentioned above. Then right click on the file, Open With and select a different program (checking to make it the default). Now check the registry. It is unchanged, but now the file is associated with a different description, icon and default program.
-
Jim McKeeth about 12 yearsI believe that is what
HKEY_CLASSES_ROOT
maps too. Those store what theassoc
command returns. But the override information returned by Default Programs in the Control Panel is different. -
Jim McKeeth about 12 yearsI saw your edit about it being aliased to classes root. But you are missing the point that somewhere else there is overridden associations that are displayed in the Default Programs list from Control Panel.
-
soandos about 12 yearsand it is not the settings in HKCU?
-
Jim McKeeth about 12 yearsNope, see the update I added. You can test it yourself.
-
soandos about 12 yearsExplorer uses a different registry key
-
Jim McKeeth about 12 yearsI was just looking in that 3rd place when you posted it. Thanks!
-
soandos about 12 yearsYou are very welcome. Sorry about the earlier confusion.