Search notes:

Registry: HKEY_CLASSES_ROOT\.ext

The key HKEY_CLASSES_ROOT\.ext allows to associate a file type (which apparently is identified by its file name extension such as .mp3, .txt or more generally .ext) with an (existing) application. This application is identified by ProgId which is stored in the registry under HKEY_CLASSES_ROOT\ProgId.
The ProgId is determined by the default value of HKEY_CLASSES_ROOT\.ext.

TODO

Why do I all of a sudden have the subkey subkey OpenWithProgid?
Do I need to call SHChangeNotify after changing an association manually?

See also

HKEY_CLASSES_ROOT\SystemFileAssociations
assoc (cmd.exe).
The sub key HKEY_CLASSES_ROOT\.ext\PersistentHandler.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
HKEY_CLASSES_ROOT
filename extensions

Index