How to Change App Protocol Associations in Windows 11
App protocol associations in Windows 11 control which program opens specific web links, such as mailto: or http: requests. Windows 11 protects these links with security signatures called cryptographic hashes. That is why simple registry edits or file replacements do not work: Windows sees the mismatched hash and quietly resets the choice.
If you want to set these protocol links across a PC, or across many PCs, use the built-in deployment tools instead of manual file changes. This guide uses DISM and an XML file of defaults. It works on Windows 11 Home, Pro, Enterprise and Education, because DISM is part of every edition. You need an administrator account.
Open an elevated Command Prompt and run dism /online /Export-DefaultAppAssociations:📁C:\
Generate a Default App Associations XML File
You can generate a default app associations XML file by using the Deployment Image Servicing and Management (DISM) tool from an elevated Command Prompt. The export command captures your current file type and protocol mappings, so you can save and modify them for deployment across multiple computers. For best results, set up one reference PC the way you want it first, so the export contains the choices you want to copy.
- Open the Start menu and type
cmd. Right-click Command Prompt in the search results and select Run as administrator. Click Yes if User Account Control asks for permission. The window title should begin with “Administrator”. - Type the export command using the DISM tool to capture your current settings. Run the following command, replacing the path with your desired save location:The folder you choose must already exist. If the command fails with an access error, the window is probably not elevated, so close it and repeat step 1.Code
dism /online /Export-DefaultAppAssociations:C:\temp\DefaultAssociations.xml - Press Enter and wait for the operation to complete. DISM should report that the operation completed successfully.
- Navigate to
C:\temp\DefaultAssociations.xmlusing File Explorer to verify that the XML file was created. If the file is missing, check the path you typed in the command.
Modify the Default App Associations XML
Editing this file lets you control which programs open specific links and files. Work on a copy of the exported file so you can go back to the original if something breaks.
- Right-click your exported XML file. On Windows 11, you may need to select Show more options first. Then select Open with and choose Notepad. The file opens as plain text, with one entry per file type or protocol.
- Locate the specific protocol or file extension entry you want to change within the XML structure. Each entry uses an identifier tag that names the extension or protocol, alongside the identifier of the target application. That is the AppUserModelID, or a ProgId for classic desktop programs.
- Modify the application identifier string to point to your desired handler. Keep the exact syntax of the surrounding XML tags, including the quotation marks and angle brackets, to prevent parsing errors during import. Remove entries you do not want to enforce, because every line left in the file is applied.
- Click File and select Save to store your changes. If you made a copy, check that Notepad did not add a .txt extension to the name.
Import Default App Association Settings
You can import default app association settings on a running Windows 11 installation by running a DISM command that points to your customized XML file. The import updates the system-wide defaults for protocol and file type mappings. It applies to users who sign in for the first time after the import. People who already have a profile on the PC usually keep the choices they made themselves, because Windows treats those as personal and hash-protected. To check, sign in with a new test account.
- Open the Start menu, type
cmd, right-click Command Prompt, and choose Run as administrator. - Run the import command via the DISM utility, pointing it to your modified XML file location:Code
dism /online /Import-DefaultAppAssociations:C:\temp\DefaultAssociations.xml - Press Enter to apply the associations. DISM should report that the operation completed successfully. An error here usually means a wrong file path or a malformed XML tag.
- Restart your computer so that all running processes and shell components recognize the updated protocol mappings.
To undo the change, remove the association file with the removal command shown later in this guide, then restart. A user can also change their own defaults at any time under Settings Apps Default apps.
Add or Remove Default Application Association Settings to a Windows Image
You can add default application associations to a Windows image by mounting an offline Windows image file and using DISM to inject your custom XML file. This configures default app choices for custom operating system deployments. You need a Windows image file (.wim) and an empty folder to mount it to. Keep the image on a local drive, not a network share.
- Open Command Prompt as an administrator and mount your Windows image to a temporary directory using DISM:Wait for DISM to report that the mount completed. The mount folder now shows the contents of the image.Code
dism /mount-image /imagefile:C:\images\install.wim /index:1 /mountdir:C:\test\offline - Import the association file into the mounted image:DISM should report that the operation completed successfully.Code
dism /image:C:\test\offline /Import-DefaultAppAssociations:C:\temp\DefaultAssociations.xml - Review the applied settings with the query step in the next section, or unmount the image once configuration finishes. Do not restart the PC or close the window while an image is mounted. If a mount gets stuck, you will have to clean it up with DISM before you can mount again.
Importing settings directly into an offline image ensures that every device deployed from that image immediately respects your protocol and file extension preferences, without requiring post-installation scripting.
Review the default app association setting in an image
You can review the default app association settings in an image by running a query command in Command Prompt that points to your mounted Windows directory. This check lets you verify that your file type and protocol mappings are correct before you finalize your deployment package.
- Open Command Prompt as an administrator.
- Run the query command pointing to your mounted directory:DISM prints the association data stored in the image.Code
dism /image:C:\test\offline /Get-DefaultAppAssociations - Review the output in the command window to verify that your protocols point to the intended applications. If an entry is wrong, edit your XML file, remove the old association data from the image, and import again.
Remove default app association settings
You can remove default app association settings from a mounted Windows image by running a removal command in Command Prompt. This clears any association file you injected earlier, so you can start fresh before finalizing your custom operating system build. Use it when the imported file was wrong, or when you want the image to go back to the standard Windows defaults.
- Open Command Prompt as an administrator.
- Run the removal command targeting your mounted directory:Code
dism /image:C:\test\offline /Remove-DefaultAppAssociations - Press Enter to strip the custom association file from the image. DISM should report that the operation completed successfully. Run the query step again if you want to confirm that nothing custom remains.
Unmount the Windows image
This closes the temporary directory and writes all your app association changes into the offline image file. Without the commit switch, your edits are lost.
- Open Command Prompt as an administrator. Close any File Explorer windows or other programs that have the mount folder open, since open handles can make the unmount fail.
- Run the unmount command with the commit switch:Code
dism /unmount-image /mountdir:C:\test\offline /commit - Wait for the progress bar to reach 100 percent and verify that the mount directory is empty. If you decide you do not want to keep your changes, unmount with the discard option instead of commit.
What to do next
Once your defaults are in place, test them. Test individual URL schemes by opening a link of each type, such as a mailto: link or a web address, on a test account and checking that the right app opens. Do this on a new user profile, not your own, because your own saved choices can hide the result.
To lock down user modifications across your environment, you can also use Group Policy. The Set a default associations configuration file policy, found under the File Explorer settings in Administrative Templates, points Windows at your XML file and reapplies it at each sign-in. The Local Group Policy Editor is only available in Pro, Enterprise and Education. On Home, use the DISM import method above instead.
Frequently asked questions
How can I fix file associations in 🪟 Windows 11?
Open Settings, go to Apps, then Default apps. Search for the file type or link type, such as .pdf or mailto, and click the app currently set. Choose the app you want, then select it. Windows applies the change right away. If the app is missing from the list, install it first from Microsoft Store or the developer's website.
What are some useless apps I should uninstall on 🪟 Windows 11?
Windows has no fixed list of useless apps, so uninstall any app you do not use. Open Settings, go to Apps, then Installed apps. Sort by size or last used, select an app, and choose Uninstall. Check an app's name before removing it, since some apps are needed by other programs.
How do I delete file associations in 🪟 Windows 11?
Windows 11 does not let you delete a file association, only change it. Open Settings, go to Apps, then Default apps. Select the file type and pick a different app. To return to Microsoft's choices, select Reset under Default apps.
What do the default file type associations determine?
Default file type associations determine which app opens a file when you double-click it. For example, a .pdf file opens in one PDF reader, and a .jpg file opens in one photo viewer. Each file extension has one default app, which you can change in Settings.
Still have a question?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!