In this article, we will look on how to manage default file association on Windows 10 and Windows Server 2019/2016/2012R2. As an example, I’ll show you how to set a default browser app to open HTML files, import these settings into an XML file, and deploy file association settings to other computers manually or using Group Policy (GPO).
The main difference between Windows 10 and previous Windows versions is that now you can’t manage file association settings through the Registry or the “Open With” feature of the Group Policy Preferences. But there was a new opportunity to export the current file association settings from the “reference” computer to the XML file and apply this file on other computers. You can also export configured file associations to a Windows image that is deployed to clients on your network (manually, via WDS or SCCM).
- How to Set or Change Default Apps on Windows 10?
- Exporting File Associations on Windows 10 to the XML file
- Importing Default App Associations on Windows 10
- Set Default File Associations with Group Policy
- Changing File Association on Windows 10 via Registry
- How to Reset File Associations in Windows 10?
How to Set or Change Default Apps on Windows 10?
Suppose you want to use the Firefox browser to open .HTML files on all domain computers (you want to associate this file extension with the app).
To do this, you need a reference computer with Windows 10 (in this example, the current build 1909 is used) and the installed Firefox browser. To manually create a mapping between a file extension and a program, open the Settings -> Default Apps and click the “Choose default apps by file type” button.
Find the .HTML file in the list of file extensions and use the “Choose a default” button to change the default program to open html files from Microsoft Edge to Firefox.
You can automatically assign a specific app with the file extension for which it is registered. To do this, select Set default by apps in the Default Apps section, find your program in the list and click the Manage button.
The next screen contains a list of file types supported by the application. Select the file extensions that you want to open with Firefox.
If you need to select specific file extensions, click Choose defaults for this program and check the desired file extensions.
You can check the current associations for the files with the .html extension in the Programs -> Default Programs -> Set Association section of the Control Panel.
Exporting File Associations on Windows 10 to the XML file
You can export the current configuration of file associations to the XML file using DISM:
Dism.exe /online /Export-DefaultAppAssociations:C:\PS\DefaultAssoc.xml
The command will save all the program associations you have configured on your user profile to the XML file. You can open the DefaultAssoc.xml file in any text editor, and see the full list of file associations exported. If you need to use only a part of associations from this list (in order not to override the existing user settings), you can manually edit the XML file. Leave only the lines with the file extensions you need. For example, we’ll leave the following lines for HTM and HTML extensions:
<?xml version="1.0″ encoding="UTF-8″?> <DefaultAssociations> <Association Identifier=".htm" ProgId="FirefoxHTML" ApplicationName="Firefox" /> <Association Identifier=".html" ProgId="FirefoxHTML" ApplicationName="Firefox" /> </DefaultAssociations>
Importing Default App Associations on Windows 10
The resulting XML file can be imported into a Windows 10 on other computers using DISM tool:
Dism.exe /Online /Import-DefaultAppAssociations:C:\PS\DefaultAssoc.xml
If you manually edited the XML file and imported it through DISM, in some Windows 10 builds you may encounter multiple errors “App default reset notification” at first logon. Microsoft does not recommend to manually edit this XML file.
You can also import these settings to the offline Windows image in the WIM file. First, you have to mount the image:
Dism /Mount-Image /ImageFile:C:\mnt\images\install.wim /MountDir:C:\mnt\offline
And then import the XML file:
Dism.exe /Image:C:\mnt\offline /Import-DefaultAppAssociations:\\Server1\Share\DefaultAssoc.xml
Dism.exe /Image:C:\mnt\offline /Get-DefaultAppAssociations
Set Default File Associations with Group Policy
Windows 10/8.1 introduced a new Group Policy (GPO) option that allows you to apply an xml file with file association settings to all current users on a computer.
This policy named Set a default associations configuration file is located under Computer Configuration -> Administrative Templates -> Windows Components ->File Explorer.
Enable the policy and specify the UNC path to your XML file. It can be located on a shared network folder, SYSVOL directory on the domain controller or pre-copied to the computers using GPP or SCCM.
The new file association settings will be applied to all users of the computer after the next login.

Since Windows 10 tracks changes in the file association settings, the first time you try to open an HTML file, a window may appear confirming that Firefox is used as the default program to open this file type (the request appears only once). Such a request will always appear after installing a new application, that is registered to open an existing file type or protocol. You can hide these notifications by enabling the policy “Do not show the ‘new application installed’ notification” in the same GPO section.
Changing File Association on Windows 10 via Registry
As we said above, in Windows 10 the way to set file association options has changed. In the previous section, we showed you how to configure the association for the .html file type with a Firefox browser through an XML file and Group Policy. Now let’s see how it looks in the Windows 10 registry.
Run the Registry Editor (regedit.exe) and go to the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\FileExts\.html\UserChoice. This registry key contains the association settings for the html file extension. Please note the following registry parameters:
- ProgId – this is the identifier of the registered app for opening this file type. This app is specified in the XML file. If a long identifier is specified instead of the application name, then the file association with the modern UWP (Metro-style) application is configured.
- Hash – a hash value that is automatically generated to validate matching the type of files with the program. The presence of this hash ensures that the user or administrator (through the GPO) has configured this file mapping. This security mechanism is needed to protect users from malicious programs that can replace file associations without user’s approval.
If you try to manually change the ProgId registry value and associate another program, the Hash value will cease to be valid. In this case, Windows 10 will automatically reset the file association settings to the default state. In this case, the user will see a notification:
An app default was reset. An app caused a problem with the default app setting for .html files, so it was reset to Microsoft Edge.
Accordingly, in Windows 10/Windows Server 2016 you won’t be able to configure file mapping through the registry, as it worked in Windows 7/Windows Server 2008R2.
How to Reset File Associations in Windows 10?
Using the following command, you can reset the settings of file associations imported earlier:
Dism.exe /Online /Remove-DefaultAppAssociations
After running this command, all new users will be logged with the default file association (the reset has no effect on the existing user profiles).
In order to reset the file associations manually configured by the user to the default ones, you need to click on the Reset button in the Settings -> Apps -> Default Applications.
In this case, all file associations will return to the state of clean Windows 10 installation.
12 comments
Wow…Microsoft sure knows how to SCREW things up!
If they would just keep things simple then they would have a much faster OS…
There is no need whatsoever for File Associations so they just need to get rid of it altogether…
If an application knows how to open up a file then let it do so…if it FAILS then let that application FAIL.
Same thing goes for Browsers…Get rid of DEFAULT BROWSERS…
Let the User of the Computer decide what Browser they want to use.
There is no need whatsoever to be asking the User what App they want to open WHAT FILE…
Garbage…
Get rid of the whole File Associations thing and watch how much faster the OS will be.
Just saying.
– SCOTTY
Huh? How can this possibly work:
1. Remove all file associations… and all default browser settings.
2. All the files will somehow just “magically” know which programs to use, when opening a file.
3. Let the computer decide.
How can the hardware (computer) decide?
The File Associations are what *MAKES* things work.
Beam that comment down Scotty!
File associations have been around since MS-DOS days. It is how the MS operating systems have grown over time to make use of these human discernable understanding of an OS, even Linux world has a few. like .RPM etc.
How does the OS know that a file/program belongs to Scotty vs Gustaaf? It’s last name of course! Extensions and default handlers fill in that gap like a last name. And you missed the part where the author explained that extension handling is now a security concern too, where we would want to prevent unauthorized changes!
Scotty is right, this is insanely stupid. There should be a GPO not a link to an XML file somewhere for setting the default for application. This is Microsoft allowing you to do something but making it extremely difficult and add a performance penalty. A default browser is an option in Windows, with no equivalent GPO there is only one reason to do that, make IE or whatever other br4owser MS creates the hardest possible default to change.
No, Scotty is VERY wrong and isn’t thinking any of these suggestions through. It’s a recipe for a poor user experience, and the idea of having no default handlers is a security nightmare and an attacker’s wet dream. And there is no performance penalty to default file types either. Also, you have to have at least one default browser on the system. How else could you download another?
As for why there is no GPO ability, again think it through. Back in the XP/Vista/7 days any program could install and usurp your default applications with little effort. MS made changes that made it more difficult (which is good, especially today) for applications to change default file types without your knowledge. If a GPO was available (i.e. just making registry changes), that would effectively create a loophole bringing this problem back into existence.
And none of this is “extremely difficult”, nor does it cause a performance penalty.
I agree with you but there is a way to make registry changes to associate a program with an extension.
For example for “.txt” extension the Registry Editor path is:
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice
and you can add or edit the key “ProgId” (type REG_SZ) and you can add a custom value like “Applications\Code.exe” for using Visual Studio Code (if it’s installed) instead of Notepad.
You can also change the program list for extension “.txt” in Registry Editor path:
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithList
(where you have a list of type “REG_SZ” with names like “a”, “b”, “c”, and so on, and values like “NOTEPAD.EXE”, “Code.exe”, “chrome.exe” and so on).
But the whole system is stupid now. I need a more finegrained system than this. I have hundreds of machines, laptops and desktops, with different associations everywhere. I want to change 1 association, for that I would have to “export all the things” and apply them again? What a drag.
> How does the OS know that a file/program belongs to Scotty vs Gustaaf?
File associates have NOTHING to do with “what person does this file belong to”. Ugh.
Thank you for great summary and details of the FTA topic (FTA global configuration is nighmare in terminal server environment for all the time, regardles of old or new method).
I have an additional question related to usgin .xml in GPO.
Do you know whether it is neccessary to allways export/import entire FTA .xml file or it is enought to apply just part of FTAs realeted to my interrest – rest of already configurad FTAs will not be changed/reset?
In the GPO example, you seem to the Local group Policy editor opened, not the Group Policy Management of a DC. Do you recommand changing the GPO settings on the server it self? I have a DC GPO applied to the server and it works but if the user changes the association, at next logon, it’s not changed again.
The GPO doesn’t work. The policy is applied correctly and successfully, the registry settings in both HKLM and HKCU have changed correctly… i.e. with correct ProgID in UserChoice… The XML file is correct. Yet, when clicking on a file it still insists “What application do you want to open this file with?”… Logged off/on numerous times too. Having spent hours on this supposedly easy and common task, all I can say is…”Microsoft, I am so frustrated with you”
Found the answer to my above problem, the ProgID in XML file was set to “Application\chrome.exe” when I changed it to “ChromeHTML” everything started to work! May be this will help someone out there having the same problem..