Windows 10 file type association (last update: 2019-10-26, created: 2019-10-26) back to the list ↑
Windows 10 mechanism

dism /online /export-defaultappassociations:"asdf.xml"
dism /online /import-defaultappassociations:"asdf.xml"

The XML file looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<DefaultAssociations>
  ...
  <Association Identifier=".py" ProgId="Applications\python.exe" ApplicationName="python.exe" />
  ...
</DefaultAssociations>

The ProgId is actually a key in the same registry paths as the Legacy mechanism uses (see below).

See also:
https://blogs.technet.microsoft.com/windowsinternals/2017/10/25/windows-10-how-to-configure-file-associations-for-it-pros/
https://stackoverflow.com/questions/46568347/how-do-file-associations-populate-the-progid-and-applicationname
https://docs.microsoft.com/en-us/windows/win32/shell/fa-progids?redirectedfrom=MSDN

Legacy mechanism

gynvael:haven-windows>assoc .py
.py=Python.File

gynvael:haven-windows>ftype Python.File
Python.File="D:\bin\python2714_64\python.exe" "%1" %*

These use the following registry keys:

HKEY_CLASSES_ROOT\
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\
HKEY_CURRENT_USER\Software\Classes\

Additional interesting keys

HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications
【 design & art by Xa / Gynvael Coldwind 】 【 logo font (birdman regular) by utopiafonts / Dale Harris 】