How to configure your Windows 10 default file associations in MDT

You will first need to configure all your file associations on a test machine. Once this has been done, you will want to run the following command to export your file associations:

Dism.exe /Online /Export-DefaultAppAssociations:%USERPROFILE%\Documents\DefaultAppAssociations.xml

The XML file will be exported to your Documents folder

Now you will want to place the XML file that we just exported into your Scripts folder inside of your MDT Deployment Share.

Once that is done, launch MDT and open your deployment task sequence. Locate the PostInstall folder and add a command line task above the Inject Drivers task.

Set File Associations
Set File Associations - 2

Lets go ahead and name the task Set File Associations. In the command line field, insert the following command:

Dism.exe /Image:%OSDisk%\ /Import-DefaultAppAssociations:%SCRIPTROOT%\DefaultAppAssociations.xml

Now you’re all set!


  1. This only works for the administrator which initially logs on during MDT Deployment. Subsequent users logging on do not get these preferred settings. It is not across the board for all users this way. Besides, default settings are user-specific. My guess is the xml needs to be copied to a different location for it to apply to all users logging in. I did all of this. It worked for the admin but not for any users signing on after.

    • Jose Espitia

      Rich, I have been using this method for over a year and have not seen these issues. Are you sure that the user accounts that you used to logon were brand new profiles?

  2. How do you do this for in-place upgrade to windows 10?

    • Jose Espitia

      Saeid, you will need to force the setup.exe to run a post script after the upgrade is complete. With this script, you can configure the file associations and any additional tasks that need to be completed. Feel free to contact me if you have any other questions.
      Example on how to run a post script with setup.exe:
      Setup.exe /NoReboot /ShowOobe None /Telemetry Enable /PostOOBE C:\SetupComplete.cmd

  3. Francisco Piñero

    Hi Jose, im try the Dism.exe /Image:%OSDisk%\ /Import-DefaultAppAssociations:%SCRIPTROOT%\DefaultAppAssociations.xml command but dont funcion, i see in the Microsoft page, that this change dont work with since new 1511 build. Is true, how i can solved? Thanks.

    • Jose Espitia

      I have been using this with Windows 10 1607 for over a year. Do you have DefaultAppAssociations.xml in your MDT Script folder? Please use my contact form if you have the xml file in your script folder and you are still having issues.

  4. How can I import this and the custom start menu during sysprep so that it applies to all new user logins? I’m not using MDT.

    Do I add the script in SetupComplete.cmd? What would the script look like if have the exported file in the admin documents folder or c:\?

    • Jose Espitia

      You can import the file associations using the SetupComplete.cmd but it will only affect new accounts.
      You will want to add the following line in your cmd file:
      Dism.exe /online /Import-DefaultAppAssociations:c:\DefaultAppAssociations.xml

Leave a Reply