Windows 10 default programs keep changing

Since the fall update last month, Windows 10 automatically keeps changing the default apps for certain types (mostly browser,pdf,mp3,jpg). I have tried changing them back from the Settings app as well as the Control Panel.

I have observed that this happens mostly while unzipping files using WinZip. Windows changes the default programs back to Microsoft recommended programs such as Edge, Photos, Groove etc.

Is there a way to restrict this from happening? Has anybody else encountered a similar situation? I couldn't find similar question anywhere so I'm asking this here.


Solution 1:

I've had this problem frequently but randomly. I was finally able to track down one set of triggers for the issue, but not a direct fix... only hackish, partial workarounds.


Workaround:

For example, "Groove" or "Movies & TV" will try to grab the associations of music and video formats. The only solution I have found is to uninstall these seemingly uninstallable programs.

http://www.howtogeek.com/224798/how-to-uninstall-windows-10s-built-in-apps-and-how-to-reinstall-them/

The above article describes how to use (admin)Power Shell to temporarily uninstall some Microsoft installed apps.

For example:

Get-AppxPackage *zunemusic* | Remove-AppxPackage

or

Get-AppxPackage *zunevideo* | Remove-AppxPackage

After uninstalling these apps, Windows 10 has never tried to re-take these file associations. I was half expecting it to try regardless and break the associations completely, but was fortunate.

Unfortunately this will not fix all of these problems. PDFs will continue to revert to Microsoft Edge because it cannot be uninstalled by this method.


Trigger cause:

I was able to track down a trigger that causes this to one of my programs. Though I'm not certain that it is the only one that does it as it only causes some associations to change. So more likely it is certain actions that the program causes sets up the first trigger; and another program completes the trigger sequence.

According to procmon, it does some registry snooping with file associations. The second trigger is to open a program that is associated with a file type that often reverts. That second program also snoops at file associations according to procmon.

What I imagine happens is that the first program does something to corrupt the "protection" Windows 10 has for programs changing file associations. Opening the second program causes Windows to re-check its protection and when the hash/progid ends up being invalid, it gets reverted to Microsoft defaults.

For example, I can see an old version of PhotoShop and Firefox doing this. They both look at the key

HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice

Program 1 messes up the hash/progid somehow, Program 2 which is associated with the type makes Windows re-check it and revert it. I'm a little mystified as to why it's deemed corrupted to begin with because the file association is correct before and after Program 1 does its thing. The association wasn't hijacked, so it didn't need Microsoft's overreach to begin with.

Not all of my systems have the same programs installed, so I'm guessing there may be many esoteric old programs that cause the first trigger event. Aside from my original workaround above, I guess you could be mindful using the offending programs. (shrug)

Solution 2:

An explanation and solution is given at ghacks.

You can either use Stop Resetting My Apps which was developed to stop this resetting

Stop Resetting My Apps

or modify the registry by hand.

So, here is what you need to do for that if you prefer the manual way:

  1. Tap on the Windows-key, type regedit.exe and hit the Enter-key. This opens the Windows Registry Editor. If you can, open a second Registry window for easier handling of the following operations.
  2. Navigate to the following key: HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages
  3. Locate the application you want to block from being the default, and open App\Capabilities\FileAssociations there. This displays the list of file associations of that particular application.
  4. Take note of the value in Data, it looks like a long random string: AppXsq3757nydv3f9bx6862hv0t4z7ennqqd
  5. Please note that this string may be different for any of the file types or protocols listed there.
  6. Switch to the second Registry Editor window, and go to HKEY_CURRENT_USER\SOFTWARE\Classes\ThatRandomString, e.g. HKEY_CURRENT_USER\SOFTWARE\Classes\AppXsq3757nydv3f9bx6862hv0t4z7ennqqd
  7. Right-click on it, and select New > String Value.
  8. Name it NoOpenWith, and keep its value empty.

Repeat the process for any file association that you don't want that particular app to be ever associated with again.

Solution 3:

Several apps like Edge, Groove or Photo took over control of your files when you upgraded to Windows10, you will then not be able to choose your own software of your liking to open your files. BUT this behaviour can be stopped if you add a setting to your registry to Exclude E.g. Edge as an "available" file handler for PDF files. Following will stop Edge for blocking the use of Acrobat to open PDF files and other software like FIREFOX to open HTM and HTML files (I use the word BLOCK because Edge acts like a VIRUS, it always resets the file association back to Edge, even my 20th attempt to associate Acrobat Pro or Reader was re-set after a few hours, sometimes seconds.. ). Now to the Regedit setting. You need to look-up the associated PROGRAM-ID inside the registry AND then create a new key for the FILE TYPE you want to exclude from that program. The following entry....

[HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.MicrosoftEdge_25.10586.0.0_neutral__8wekyb3d8bbwe\MicrosoftEdge\Capabilities\FileAssociations]
".htm"="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9"
".html"="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9"
".pdf"="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723"
".svg"="AppXde74bfzw9j31bzhcvsrxsyjnhhbq66cs"
".xml"="AppXcc58vyzkbjbs4ky0mxrmxf8278rk9b3t"

...shows that for PDF
AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723
is that PROGRAM-ID.

Now you go to...
HKEY_CURRENT_USER\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 (note the same ID) and create a new STRING key NoOpenWith (leave it empty)

EXAMPLE (as long as MS does not change the IDs) the following will stop Edge to hijack .HTM .HTML and .PDF files:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Classes\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9]
"NoOpenWith"=""

[HKEY_CURRENT_USER\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723]
"NoOpenWith"=""

(you can copy this to a text file, change extension to .reg and import it to your registry.)
If you remove those 2 keys NoOpenWith again, it will revert to original setting.

Solution 4:

I switched to the latest version of WinZip (20.0) and haven't encountered the problem since. So i guess the previous version (15.0) was in some way incompatible with Windows 10 file associations and triggered the reset.

Solution 5:

I've found a way prevent edge from becoming the pdf / html handler. It's possible by adding the Noopenwith value for Edge's ProgID (the AppX..... key, this may vary from system to system). More details on it here. How to Stop Edge From Hijacking Your PDF or HTML Associations? The same method works for any other app.