How to stop Microsoft Edge from opening PDF files



Windows 10 and 11 contain a built-in web browser, Microsoft Edge, that is also set up as the default application for handling several other popular files, such as PDF. If you prefer another program to open the PDF files, you can set up that program using the Default Programs tool of Control Panel. You could also use the Open With... command that appears on the right-click menu for the PDF files.

However, in some situations, changing the default application for handling the PDF files does not stick: it may work once or twice, and then Microsoft Edge takes over, reverting the file association of the PDF files to itself. You can try to change the default application once more, but soon Windows "forgets" about your decision and starts opening them with Edge again. If you experience such a problem, the following solution might help.

UPDATE: The latest versions of Microsoft Edge come with an option that lets you control how it handles the PDF files:

  • In Microsoft Edge, press Alt+F (or click on the ellipses right below the X button in the top-right corner) and choose Settings;

  • In the left-hand column, click on Cookies and sites permissions;

  • In the right-hand part of the screen, scroll to the middle of the Site permissions list and click on PDF documents;

  • Finally, turn on the option Always open PDF files externally or Always download PDF files.

Configuring Edge to always down,oad PDF files

If your version of Edge does not offer this option, then the following registry modification might work, read on.

First things first: the following steps involve changing values in Windows Registry. Please be extra careful with it, because if you do something wrong, you can damage your Windows installation and even make your computer disabled. If you are not familiar with the Registry Editor, you may want to ask a more experienced friend or a colleague for help.

To solve the problem of Microsoft Edge hijacking the PDF files, run Registry Editor (RegEdit.exe), and navigate to the following key:

  HKEY_CURRENT_USER
    SOFTWARE
      Classes
        Local Settings
          Software
            Microsoft
              Windows
                CurrentVersion
                  AppModel
                    Repository
                      Packages

Under this key, look for a key that starts with Microsoft.MicrosoftEdge. At the time of this writing, such a key is named:

Microsoft.MicrosoftEdge_38.14393.0.0_neutral__8wekyb3d8bbwe

However, it could be changed in the later versions of Windows. Expand this key and also expand the following keys under it:

  Microsoft.MicrosoftEdge_38.14393.0.0_neutral__8wekyb3d8bbwe
    MicrosoftEdge
      Capabilities
        FileAssociations

Select FileAssociations and look at the list in the right-hand part of the screen:

Editing Registry with Registry Editor

Take a note of the Data string displayed for the .pdf name. At the time of this writing, the string is AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723, but it may change in the future versions of Windows.

Now, while still in Registry Editor, navigate to the key:

  HKEY_CURRENT_USER
    SOFTWARE
      Classes
        AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723

We want Windows to stop using this key, but we don't want to delete it (in case we decide at a later time to undo the change), so we will just rename this key to something else (that would stop Windows from using it just as well). Right-click on AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723, and choose Rename from the menu. Add the underscore character to the end of the name and press Enter to save the new name:

Editing Registry with Registry Editor

Now use the Default Applications tool of Windows Control Panel one last time to set up a default application for the PDF files (other than Edge). From now on, Edge should not reinstall itself as the default application.

If you decide later on that you want to return to the previous behavior, simply remove the underscore character from the name of the AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 key (thus restoring its original name).

If you want to link to this article, you can use this HTML code: <a href="https://www.winability.com/how-to-stop-microsoft-edge-from-hijacking-pdf-files/">How to stop Microsoft Edge from opening PDF files</a>

Read more