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

1 Comment

  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

Submit a Comment

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