Reddit 49 Shares

We saw how to stop Microsoft Edge and Photos from resetting your file association settings. Based on the same, I thought of implementing the registry edit for all the Metro apps (or Universal Windows Apps) such as 3d Builder, Zune music, Zune video (Movies & TV).

The registry edit workaround at the end of this article stops Windows 10 (v1607 and earlier) from resetting file associations to default settings.

RELATED: Set Default Browser and File Associations via Command-line in Windows 10

Solution

The app defaults are reset by Windows 10 if it finds that an incompatible third-party program making changes to file associations directly, rather than directing users to the Default Apps window. Since the UserChoice → ProgID hash algorithm is in place in Windows 10, incorrect modification of file associations in the registry would cause Windows 10 to reset the association settings to defaults.

In Windows 10, applications must not write the ProgID value in the following registry key directly:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\{.extension}\UserChoice

{.extension} in the above registry path refers to the file extension. It may be .htm , .html , .pdf etc.

Instead, the application should redirect the user to the Default apps window. This is a major change in Windows 10.

If a (legacy) application doesn’t use Windows API and writes to the registry to set the file associations, Windows 10 detects that the registry (“UserChoice” key) is corrupted and will reset the fail-safe Windows default program for this file extension. The user will see the An App default was reset notification.

After you get the notification, if you open the Event Viewer and go to Microsoft-Windows-Shell-Core/AppDefaults event log, you’ll see which file type association was recently reset.

Open the Event Viewer ( eventvwr.msc ) → Applications and Services Logs → Microsoft → Windows → Shell-Core → AppDefaults

) → Applications and Services Logs → Microsoft → Windows → Shell-Core → AppDefaults Look for the most recent event with ID 62441 .

Log Name: Microsoft-Windows-Shell-Core/AppDefaults Source: Microsoft-Windows-Shell-Core Date: Event ID: 62441 Task Category: (62441) Level: Information Keywords: User: DESKTOP-JKJ4G5Q\ramesh Computer: DESKTOP-JKJ4G5Q Description: User choice has been reset to prog id AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9 for .htm In the above example, .htm file type association was reset and Microsoft Edge is now the default handler for the file type. AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9 is the Microsoft Edge ProgID for .htm/.html files, as seen in the registry.

If you’re unsure which program is trying to modify the above registry key, use Process Monitor and inspect “UserChoice” entries in the trace.

So, make sure the third-party programs you’re using comply with the rules of Windows 10. The ultimate fix would be to upgrade the 3rd party program (viewer, browser or anything), and making sure that it is compatible with Windows 10.

RELATED: Set Default Browser and File Associations via Command-line in Windows 10

Quoting Microsoft’s Raymond Chen Program X wants to set itself as the user’s preferred handler, but they want to do so without requiring the user to confirm the change. How considerate of them. So they manipulate the registry keys directly. (I bet somebody got a really nice bonus for that feature.) But they are manipulating them the pre-Windows 10 way. This means that Windows 10 detects the settings as corrupted and throws them away, causing the handler to fall back to the system default. The customer has a few choices here. The obvious choice is to stop using Program X. Easier said than done. Program X is probably essential to the customer’s workflow. That’s why they want to set it as the default! Another option is to work with the vendors who produce Program X and get them to stop mucking around in internal registry keys. (Good luck with that.) Reference: Why do my PDF file associations get reset every time I restart? | The Old New Thing

In early builds of Windows 10, you can use the registry fix (workaround) below to prevent Windows 10 from resetting file associations.

Workaround

Update [2019] : The following registry fix doesn’t work in Windows 10 v1809. Although the registry values are in place, Windows 10 relentlessly resets the file association if it finds that the UserChoice key is written (and corrupted) by a third-party program.

For v1607 and earlier

On early builds of Windows 10, running the registry edit below stops Microsoft Edge, Photos, 3d Builder, Zune music and Zune Video (Movies & TV) from taking over your file associations for various files types, without impeding the Apps functionality in any way. To reverse the changes, simply run the undo REG file. The registry fix was tested up to Windows 10 v1607.

[Download REG file – w10_stop_reset_fileasso.zip] Contents of this REG file are below.

Windows Registry Editor Version 5.00 ;Description: Prevents Windows 10 from resetting the file associations ;... by adding NoOpenWith & NoStaticDefaultVerb values for all the modern apps. ;Created on Feb 13 2016 by Ramesh Srinivasan ;Updated on May 01 2019 ;The Winhelponline Blog ;https://www.winhelponline.com/blog ;Tested in Windows 10 v1511 & 1607 ;------------------- ;Microsoft.3DBuilder ;------------------- ;File Types: .stl, .3mf, .obj, .wrl, .ply, .fbx, .3ds, .dae, .dxf, .bmp ;... .jpg, .png, .tga [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;------------------- ;Microsoft Edge ;------------------- ;File Types: .htm, .html [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;File Types: .pdf [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;File Types: .svg [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXde74bfzw9j31bzhcvsrxsyjnhhbq66cs] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;File Types: .xml [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXcc58vyzkbjbs4ky0mxrmxf8278rk9b3t] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;------------------- ;Microsoft Photos ;------------------- ;File Types: .3g2,.3gp, .3gp2, .3gpp, .asf, .avi, .m2t, .m2ts, .m4v, .mkv ;... .mov, .mp4, mp4v, .mts, .tif, .tiff, .wmv [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXk0g4vb8gvt7b93tg50ybcy892pge6jmt] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;File Types: Most Image File Types [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;File Types: .raw, .rwl, .rw2 and others [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX9rkaq77s0jzh1tyccadx9ghba15r6t3h] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;------------------- ; Zune Music ;------------------- ;File Types: .aac, .adt, .adts ,.amr, .flac, .m3u, .m4a, .m4r, .mp3, .mpa ;.. .wav, .wma, .wpl, .zpl [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs] "NoOpenWith"="" "NoStaticDefaultVerb"="" ;------------------- ; Zune Video ;------------------- ;File Types: .3g2,.3gp, .3gpp, .avi, .divx, .m2t, .m2ts, .m4v, .mkv, .mod ;... .mov, .mp4, mp4v, .mpe, .mpeg, .mpg, .mpv2, .mts, .tod, .ts ;... .tts, .wm, .wmv, .xvid [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX6eg8h5sxqq90pv53845wmnbewywdqq5h] "NoOpenWith"="" "NoStaticDefaultVerb"=""

After running the REG fix, click Start → Settings → Default apps and set file associations or default apps. None of the built-in Universal Apps should reset the associations from now on. This method has been tested (and works fine) in Windows 10 v1511 and 1607.

Note that this registry edit also hides the modern apps in Open with dialog, but they still appear in Settings → Default apps window.

Updates

June 01, 2016: If using a local account, try switching to Microsoft account , as this helped some users. If you don’t want to switch to Microsoft account, try the Fix #2 in article Unable to Set Default File Association Using Default Apps in Windows 10. (Ignore the page title)

Feb 25, 2016: In Windows 10, to configure your default apps, click Start button, Settings, System and then Default apps. This is the only supported method to manually change your default app settings. We’ve seen behavior by some apps that have set themselves as default in unsupported ways by deleting or corrupting registry settings. Details on supported methods for apps to register file associations can be found on MSDN here. Update KB3135173 for Windows addresses the problem and resets application defaults to the initial Windows settings when registry settings are deleted or corrupted. We have worked with some of these app providers so the apps no longer exhibit this behavior in their latest versions. If a user proactively changes their default app settings using the supported method, the registry won’t be corrupted and those user settings are retained. Source – Betsy [MSFT]

(Last Updated on May 03, 2019.)

One small request: If you liked this post, please share this? One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions: Pin it!

Share it to your favorite blog + Facebook, Reddit

Tweet it! So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Reddit 49 Shares