Where is the Default Program associations stored in the registry?

17

5

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

Posted 2012-06-14T18:01:53.567

Reputation: 4 907

Question was closed 2014-11-20T18:10:20.127

Answers

20

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\

soandos

Posted 2012-06-14T18:01:53.567

Reputation: 22 744

I believe that is what HKEY_CLASSES_ROOT maps too. Those store what the assoc command returns. But the override information returned by Default Programs in the Control Panel is different. – Jim McKeeth – 2012-06-14T18:10:31.307

I 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. – Jim McKeeth – 2012-06-14T18:11:53.117

and it is not the settings in HKCU? – soandos – 2012-06-14T18:12:45.610

Nope, see the update I added. You can test it yourself. – Jim McKeeth – 2012-06-14T18:15:26.420

Explorer uses a different registry key – soandos – 2012-06-14T18:19:14.447

I was just looking in that 3rd place when you posted it. Thanks! – Jim McKeeth – 2012-06-14T18:20:23.683

1You are very welcome. Sorry about the earlier confusion. – soandos – 2012-06-14T18:21:07.097