guide · static export
Customization

Export and Reapply Default App Associations

Save which program opens which file type and restore it after a reinstall, including the Windows 11 limits that silently ignore half the file.

by@guidox updated:10/31/26 time:20 min level:Intermediate tested on:Windows 11 24H2 works on:Windows 10, Windows 11 tools:PowerShell as administrator, DISM
TL;DR

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.

Before you start

Requirements

  • Admin rights
  • The machine set up the way you like it
  • Twenty minutes
Step by step

Instructions

01

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
02

Read what the file really contains

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
tipRows for Store apps carry an AppX identity instead of a path. Those resolve only when the package is installed.
03

Understand the Windows 11 limit

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.

⚠ warningThis is the most common reason the command reports success while nothing changes.
04

Apply it to the offline image

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
05

Apply it on a running machine only during setup

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
06

Verify what actually took effect

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
Troubleshooting

Common issues

Everything opens in Edge after the import

The import ran after the first logon. Only the setup phase is honoured completely.

The command succeeds and nothing changes

User choice hash protection on 22H2 and later. Set the few types you care about in Settings.

A browser resets itself weekly

An update of that package rewrote its own association. Set it once more after the update settles.

An XML from another PC fails

One of the named applications is not installed here. Remove those rows and import again.

FAQ

Frequently asked

Is there a supported way after setup?

The Settings page per file type, or a provisioning package built in Windows Configuration Designer for managed machines.

Does the file cover protocol handlers?

Yes. http, mailto and similar are listed next to the extensions.

How to undo this

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.

Changelog · 1 entry
  1. 2026-10-31
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress