Windows 10 – Setting Default File Associations using a Configuration Manager Task Sequence

Posted: September 24, 2015 in Configuration Manager 2012, Uncategorized, Windows 10
Tags: , , ,


If you’re having difficulty setting default file associations using the dism import method then you can try the following alternative.

  1. Perform a basic Windows 10 deployment and set your file associations manually as per your preference
  2. Create an xml file of these file associations by running Dism /Online /Export-DefaultAppAssociations:<path to xml file>\AppAssociations.xml
  3. Rename this file to OEMDefaultAssociations.xml
  4. Create a Configuration Manager Package with this file and distribute to your DP’s
  5. Add a Run Command Line step in your Windows 10 Task Sequence which copies the file to c:\Windows\System322017-01-30_145524
  6. Windows 10 will use this xml file when setting default file type associations


I’ve updated the script I use to Powershell. Process is the same though.

Be aware that a lot of people have reported difficulty in setting file association defaults with them reverting back to their defaults at first login. This seems to be related to an update that was included in the April/May Windows 10 Cumulative Update. There is no fix presently that I’m aware of however some have had the issue and some do not which makes me think its related to the application itself and how its modifying the Windows 10 default file type settings. Hopefully this will either be addressed by developers releasing updated versions of their applications that conform with Microsoft’s expectations or Microsoft releasing an update to address the issue.

  1. Create a ps1 script with the following contents: dism.exe /online /Import-DefaultAppAssociations:$PSScriptRoot\AppAssociations.xml
  2. Copy that script to a package folder with your application associations xml file
  3. Add a Task Sequence step to execute the script


With Windows 10 now approaching its 2 month anniversary since RTM, I have finally finished the reference image our agency is going to use. Its taken quite a few attempts to get things right so hopefully some of my approaches to implementing solutions to some common issues will save you some time and effort.

Firstly lets establish how I’m creating my reference image. I’m using two Hyper V Virtual Machines running on a solid state drive.

1 x Server 2012 R2 with MDT 2013 Update 1 Build 8298

1 x Server 2012 R2 running a WSUS instance

Then running a pretty standard Build and Capture task sequence with LTISuspend.wsf to allow for some minor changes. With that out of the way – lets talk about how I’m setting my default file associations.

By default Windows 10 has a number of default associations which you may not wish to keep. For example, by default the PDF extension is associated with Microsoft Edge so if your deploying a 3rd party PDF reader, you’re most likely going to want to deal with this. Some other file types you may want to change may include what application is associated with photos and videos as by default these are associated with the built in modern applications. You may also want to change the default browser from Edge to Internet Explorer 11.

You can control file type associations with group policy and there are quite a few blogs already about this. I’ve chosen not to use this approach as it enforces a baseline set of associations and I want my environment to be flexible to allow for variation if needed.

  1. On a reference computer running Windows 10, install all of your standard operating environment applications then set your default programs as per your preference.
  2. Once finished run an elevated powershell instance and  type Dism /Online /Export-DefaultAppAssociations:<path to xml file>\AppAssociations.xml2015-09-24_133139
  3. Next create a new Configuration Manager package that includes this xml file and distribute it to your DP’s. You can edit the file if you need to make further changes. Note that you don’t need to create a program.2015-09-24_133611
  4. Now we need to create two new Run Command Line steps in our Windows 10 Configuration Manager Task Sequence. One to copy the xml file locally to the target workstation and a second to execute the DISM import command. I’ve added these steps to my OSD Results and Branding group section of my Task Sequence. Make sure you disable 64-bit file system redirection otherwise your DISM import command will error out.2015-09-24_135038 2015-09-24_135343
  5. That’s it! You will now have a reference image that has a default set of file type application associations.
  1. Mark Mijnders says:

    I’m in the proces of creating our company’s Windows 10 new reference image so this information is really usefull. Will you blog about the other tips & tricks you mentioned before?

  2. Mark Mijnders says:

    Thanks… in Windows 7 I was able to customize the settings for default users when they logged on for the first time (with copyprofile.xml). I wonder how that is implemented with Windows 10 when creating a reference image.

    • Damon Johns says:

      You can’t make changes to the default file associations in this way since Windows 8.1 – so using copyprofile will fail in that the changes will be reset / not recognized. There is no workaround for this and is in part why there is a powershell module to inject the changes into the Operating System now.

  3. Ry Guy says:

    Damn, I got excited when I found this post. I was hoping this would work in a W10 ENT Build 1511 after capturing and deploying a custom WIM using COPYPROFILE=TRUE. Our image is so static and we use Faronics Deep Freeze to keep it that way, so we a new profile is generated each login. Has anyone found a work a round? Reg hack maybe during a login? RunOnce registry entry perhaps? Good site btw.

  4. Tony says:

    Great site – nice to finally find some answers to this – especially making IE the default as edge doesnt allow us to snoop (we are a school)

  5. Robert says:

    Is there a way to do this with MDT? I tried and it kept failing with an error 87

    • Damon Johns says:

      Its just calling a DISM command so you should be able to do this with MDT. I’ve updated the script I use now to Powershell. You could try the following?

      1. Create a ps1 script with the following contents: dism.exe /online /Import-DefaultAppAssociations:$PSScriptRoot\AppAssociations.xml
      2. Copy that script to a package folder with your application associations xml file
      3. Add a step in your MDT Task Sequence to run a Powershell script, I don’t have a screen shot but I will update this blog with the ConfigMgr one I use here so you can transfer the settings

      Just be aware that Microsoft added a change to how Windows 10 handles default file associations in one their cumulative updates. A lot of people have reported that some file association settings revert back to the default ones at first login. This happens sometimes but not always and seems to relate to how the new application is changing the default file type in Windows 10. There isn’t a fix at the moment however I’ve found that removing the modern application seems to help i.e if you were changing the default photo application then removing the modern application as part of the OSD process will stop the file type reverting back.


  6. Matt Bradley says:

    This works great for me on 1607 with a new machine. In-place upgrade is problematic, though. With IE being set as the default, at first login the user is prompted with choosing how to open HTML, Edge or IE. It doesn’t do this with Adobe Reader being the default with PDF’s, though. They REALLY want us to use Edge.

    • Damon Johns says:

      Yes there are still quite a few issues with in place upgrades, application defaults being one of them. One thing that we have confirmed is that you need to export the full list of file type associations and do a full import of that list using dism. Messing with the list causes problems.

      • Marcos says:

        Thanks for the idea, importing a unmodified .xml. Clearing out ‘un-needed’ entries in the .XML file generates a ton of Action Bar notifications for app associations being reset.

  7. Sandy Wood says:

    I’m running into the same issue that Marcos says, above. I make changes to just extensions for Adobe and Photos alerts pop up with each user’s profile. Ugh

    • Marcos says:

      The solution I found: Create the .xml export as you already have, do not edit out lines of information. Import the untouched .xml into your deployment sequence.

      Importing an edited .xml worked fine with the RTM build. I skipped v1511 and started working with v1607 when I noticed this behavior. Further testing proved importing the unedited .xml address the Action Center notifications.

      Downside, maintaining different .xml files if you give different areas different app preferences.

  8. Swoorup Joshi says:

    I am in the process of creating an image as well. This stuff is irritating.

    I would like to have the application installed later on the first user login? And then script the default association. Is it possible to do this?

    I got it successfully to work when the application is pre-installed and then applying the dism command. But just wondering if there are other ways.

    The application is a web browser.

  9. Max says:

    When I do an export and view the contents of the xml file, it only shows about 10 file type associations. I’m running Windows 10.0.493 (1607)

  10. Jonathan LaPlaca says:

    Does the above method 1 and 2 still work. I’m using my deployment system Dell KACE K2000 and I’m having problems with Windows keeping the associations. It seems that after I apply the OEMDefaultAssociations and login to the computer as a new user see the popups reset the Associations back to the Microsoft defaults. Do this process still work after that February patch bug? I have KB4013429 March 14, 2017 Update slip-streamed in with my WIM file.


    • Damon Johns says:

      Apologies for the late reply. It works great with new user profiles, however I see the same issue as you with profiles that are migrated in my environment using USMT. I don’t have a workaround for this accept to manually set the defaults for users when we migrate them from Windows 7. The problem doesn’t occur when you migrate from Windows 10 1607 to Windows 10 1703 using in place upgrade as that retains existing user app defaults without resetting them.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s