import export file associations feature image

Import or Export File Associations using Command Prompt

File Associations is a relationship between a file and the application used to open that particular file type. There are different kinds of file types Present on your computer including images, videos, music, text documents, executable applications, and much more. Each file stores different information in different ways and can only be opened by certain programs. Windows takes the potential confusion out of this system by associating certain programs with certain file types. In Windows 10 operating system the default file associations are pre-configured. So you can open all types of files in Windows 10 by default. If you are downloading a new type of file, which the file associations are not configured on your system. Then the system will prompt for to choose an application to open the file type. You can easily change the file associations in Windows 10, and it is very easy to import or export the default file associations. This article will guide you to Import or Export File Associations using Command Prompt.

Import or Export File Associations using Command Prompt:

Windows 10 offers a feature to export the current default file associations to XML file format using DISM Default Application Association Servicing Command-Line Options. You can copy this XML file to another PC and Import the file associations easily.

Export File Associations using Command Prompt:

Open Command Prompt in elevated mode and type the following command.

dism /online /Export-DefaultAppAssociations:"%UserProfile%\Desktop\MyDefaultApp.xml"
Import or Export File Associations

This command will export the Default file Associations from your Current PC to an XML file on your Desktop under the file name of MyDefaultAPP.xml.

If you want you can change the file name and the file path in the command.

Once the command executed successfully, you’ll get the XML file on your desktop.

Import File Associations using Command Prompt:

To Import, First, copy the Exported XML file from another PC to the PC which you need to change the file associations. Next, copy the file to the Desktop.

Open Command Prompt in elevated mode and type the following command.

dism /online /Import-DefaultAppAssociations:"%UserProfile%\Desktop\MyDefaultApp.xml"

If you have the file in a different path under a different name, change it in the command line and hit enter. This command will Import the Default file associations to your current PC.

Reset File Associations to Default:

If you messed up with the File Associations, then no need to worry about it, Windows 10 allows you to reset the file associations to Default. Click on the link to know more about resetting the Default File Associations.

Read: Remove and Restore windows10 Default apps using PowerShell?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top