Stop Edge Hijacking PDF Files

KB ID 0001395

Problem

This question appeared in my inbox today, ‘Edge’ has a nasty habit of assigning itself the default PDF reader, particularly after a round of updates!

Solution

First I went and had a look at my old Experts Exchange Buddy Ramesh’s site (www.winhelponline.com) who had done the heavy lifting and worked out the registry keys;

PDF File Association Edge

Note: I’m only concerned with .pdf files, if you want to block .htm and/or .html files, then just repeat this process using the the REG_SZ values from above;

The solution for a single machine is to create the following two registry string values;

HKEY_CURRENT_USER\Software\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723
REG_SZ Name = NoOpenWith
REG_SZ Name = NoStaticDefaultVerb

NoStaticDefaultVerb

Then set the correct file associate like so;

Set file associations

Which is fine for one machine but what if you have hundreds of complaining users! Then we need to employ some Group Policies. But there’s a few hoops to jump though first. On your client machine, the one you have just tested the procedure on, export your file association to an XML file. Open an administrative command window, and execute the following command;

Dism /Online /Export-DefaultAppAssociations:C:\Windows\Temp\DefaultApps.xml

Export File Associations

If you take a look at the a file you will see, (providing you did it right) the Adobe/PDF file association.

File Accociations XML file

Now copy the file to a location all your domain clients can see, in my case I’m going to drop it in the sysvol directory.

Central location default apps

Crete a new Group Policy linked to the computers you want to apply the change to, then edit it.

GPO Default Programs

Navigate to;

Computer Configuration > Policies> Administrative Templates > Windows Components > File Explorer > Set default associations configuration file  >Enable > Put in the path to your .XML file

Set File association via Group Policy

Save and exit the, group policy, now create a SECOND POLICY linked to your USERS.

Navigate to;

User Configuration > Preferences > Windows Settings > Registry > New > Registry Item

Note: Ive already created the registry values on the machine I’m configuring the policy on, (you can export the key and import it on a domain controller to make things easier for you). Close and exit the policy editor.

Set User File association via Group Policy

Then wait, or Force Group Policy.

Related Articles, References, Credits, or External Links

NA

Author: PeteLong

Share This Post On

3 Comments

  1. Unfortunately, this fix does not work permanently. We’ve implemented this fix on one user’s machine and it continues to change back to Edge. We’ve tried just about every “fix” that we can find online but no luck. I guess 2 users out of 140+ isn’t bad but I just wish we could fix it for them.

    Post a Reply
  2. agree that this is not a permanent fix. I have Win 10 pro 1803 and Edge continues to hijack my PDF files. Despite the basic temp solution of resetting the file association, each time windows updates it resets the default to Edge. I have used the script, a similar one is attached. This works well between windows updates. However a more permanent fix is to rename the Edge launcher files in the Windows/SystemApps/Microsoft.MicrosoftEdge_8wekyb3d8bbwe folder. There are two that I suggest you rename by adding OLD before the .exe. The files are:

    MicrosoftEdge.exe

    MicrosoftEdgeCP.exe

    Note that you will need t change permissions to rename the files.

    Since doing this over 6 mths ago, I have had no problem with Edge hijacking my PDF files from Acrobat.

    Post a Reply
  3. I did the whole regedit routine and it worked for like a week- the MS update reset the pdf default to Edge. So this solution does not work- like every other solution listed on the web doesn’t work.

    Post a Reply

Leave a Reply to Fred Cancel reply

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