Export the current associations
The XML records the ProgId behind every extension and protocol. It is plain text, so you can read and edit it before it ever reaches another machine.
dism /online /export-defaultappassociations:C:\Temp\appassoc.xml
Save which program opens which file type and restore it after a reinstall, including the Windows 11 limits that silently ignore half the file.
Export with **DISM** using /Export-DefaultAppAssociations, reapply with /Import-DefaultAppAssociations. On Windows 11 the import is only honoured before the first logon; afterwards user choice protection wins.
The XML records the ProgId behind every extension and protocol. It is plain text, so you can read and edit it before it ever reaches another machine.
dism /online /export-defaultappassociations:C:\Temp\appassoc.xml
Each line names an extension, a ProgId and an application. The application must exist on the target machine under the same name, which is why portable tools break the import.
notepad C:\Temp\appassoc.xml
After the first logon Windows protects each choice with a hash per user. An import that arrives later is accepted and then quietly ignored, and the file type falls back to the previous handler.
The image has no user yet, which is the only state where the whole file is honoured. This is the supported deployment path.
dism /image:C:\Mount /import-defaultappassociations:C:\Temp\appassoc.xml
The online import works in the OOBE and audit phases. Launched from a normal desktop session it reaches only the parts Windows does not protect.
dism /online /import-defaultappassociations:C:\Temp\appassoc.xml
The per-extension key names the current handler and whether a hash is present. A missing hash means the entry is not protected and will reset.
Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice
The import ran after the first logon. Only the setup phase is honoured completely.
User choice hash protection on 22H2 and later. Set the few types you care about in Settings.
An update of that package rewrote its own association. Set it once more after the update settles.
One of the named applications is not installed here. Remove those rows and import again.
The Settings page per file type, or a provisioning package built in Windows Configuration Designer for managed machines.
Yes. http, mailto and similar are listed next to the extensions.
Associations are per user and per extension; the Settings page resets them one by one. Keep the exported XML to restore the previous state on a fresh profile.
Free · no account needed · tracks your progress