Extension incorrectly registered in Windows 11 and how to fix this [updated]

This document is now updated for Windows 11, version 22H2 installed on 28.09.2022.

I have installed IrfanView (for browsing images) and VLC VideoLAN (for watching video) — my “default pack” on freshly installed Windows 11 Pro. It turned out that many common file extensions (like .gif, .png, .jpg, .mp4, .mkv and .avi) are not registered with the corresponding applications. While all others (like .bmp, .mp3, .wav, etc.) are registered correctly.

Microsoft has messed things up even further with Windows 11 so the regular methods of manually registering these file extensions (that were working just perfectly in Windows 10) are not working anymore.

If you’re struggling with this or similar problem then you may find certain solutions in this blog post.

An overview

In my case it turned out that:

  • Certain image file extensions are incorrectly bind — opens Photos instead of IrfanView
  • Certain video file extensions are not bind at all — displays warning or does nothing

Here you have an example warning message displayed when trying to execute these files in Total Commander:

The problem

Back in old-good Windows 10 day we had at least three methods of fixing such problem manually:

  • Use Default Apps component out of Settings
  • Double-click file and select an application + check to use this binding every time
  • Right-click a file, pick Properties and click Change button.

In Windows 11 this doesn’t work anymore, because there is no checkbox:

There is no Change button:

And when trying to find given extension in Default Apps it supposedly gone from your system:

So you cannot bind it using Default Apps (the most obvious way).

The cause

Depending of file extension and your personal situation this problem can be caused by two factors:

  1. As explained in here the problem is caused by NoOpenWith flag set in Windows Registry on certain file extensions.
  2. As said in here, it can also be caused by incorrect file extension’s hash generated.

Believe it or not, but the nature of this problem is 20-30 years old and narrows down to the fact that Microsoft developers are too lazy or too stupid to write a correct code that will clean up the registry when given application is uninstalled.

So, at least in my case, I have uninstalled Microsoft Photos (and some other clip-making-related software that ships in the newest Windows 11, version 22H2 installed on 28.09.2022 — update), but all the mess related to this software was left untouched in my Windows Registry.

The NoOpenWith flag issue

With each major version of Windows 11 (this text is updated for Windows 11, version 22H2 installed on 28.09.2022) Microsoft introduces some shitty software that (in even more shitty way) steals file extension association from your preferred programs and applications. For example, after installing version 22H2 it turned out that my .jpg and .png images (again) are not being opened by IrfanView.

Because it is Microsoft, it goes even further. This shitty software that steals your associations also adds the NoOpenWith flag into Windows Registry (to all these file types). As a result (as above) you cannot reassign these files extension to another software (screenshots above).

Knowing this, all you have to do is to:

  1. Open Registry Editor
  2. Search for NoOpenWith string
  3. Remove each and every one of it.

After you do this, you will be able to assign popular extensions (like. png, .jpg etc.) back to your software.

Setting correct has using SetUserFTA utility

You can use this methods, if other fails or if you’re struggling with the Windows constantly resetting your file extension binding to default one (this happens due to incorrect file type hash, as discussed in this article).

The SetUserFTA command line utility is a very cool program, because its author managed to reverse-engineer Microsoft hash algorithm (mentioned above). Meaning that, if this program will not only register selected file extension with the application of your choice, but it will also generate required hash thus preventing Windows from resetting this binding.

You must run this from either cmd, PowerShell or Windows Terminal (new toy in Windows 11).

For registering .avi, .mp4, .mpg and .mkv video file extensions with VLC run these commands one-by-one:

SetUserFTA .avi VLC.avi.Document
SetUserFTA .mkv VLC.mkv.Document
SetUserFTA .mpg VLC.mpg.Document
SetUserFTA .mp4 VLC.mp4.Document

For registering .gif, .jpg, and .png image file extensions with IrfanView run these commands one-by-one:

SetUserFTA .gif IrfanView.GIF
SetUserFTA .jpe IrfanView.JPG
SetUserFTA .jpeg IrfanView.JPG
SetUserFTA .jpg IrfanView.JPG
SetUserFTA .png IrfanView.PNG

For other file types and applications I advice you to run SetUserFTA.exe get once and carrefuly check, if you don’t have some other bindings incorrect or messed up.

Note that SetUserFTA accepts all three methods of specifying destination application (second parameter):

  • File type — i.e. .mpg VLC.mpg.Document
  • Path — .txt, Applications\notepad++.exe
  • Hash — .ogv, AppX6eg8h5sxqq90pv53845wmnbewywdqq5h

To learn which application belongs to given hash, simply do the Google search and you should get an answer (for example the AppX6eg8h5sxqq90pv53845wmnbewywdqq5h belongs to Movies & TV application from Microsoft, which is now know as Films & TV).

If you want to generate hash for an application of your choice then read more in here or in here.

The SetUserFTA utillity may become handy in future, so I’d consider copying it to c:\Windows\System32 or to any other location listed in your PATH environment variable, so you have access to it from command line in any folder or disk.

Resetting default application

It is said that the problem of not having Always use this app to open… checkbox or Change button comes from the fact that certain file types in Windows 11 has the NoOpenWith registry value set. It is also said that you can reset or remove this value in at least three different ways:

  • Using UI
  • Using PowerShell
  • Changing Registry values

All three methods are described in here.

For example, to reset default file type binding for Microsoft Photos, Groove Music and Films & TV (which would allow you to pick your own applications instead) you can execute these commands (again, one-by-one) in PowerShell:

Get-AppxPackage Microsoft.Windows.Photos | Reset-AppxPackage
Get-AppxPackage Microsoft.ZuneVideo | Reset-AppxPackage
Get-AppxPackage Microsoft.ZuneAudio | Reset-AppxPackage

As I said before, this did not work in my case, because I already had these three apps uninstalled.

4 comments on “Extension incorrectly registered in Windows 11 and how to fix this [updated]

  1. Maur

    Thank you, on all the internet with its now virtually worthless search engines, this has been the only actual solution to this problem. I skipped the “Applications” keys in “Classes”, so I know the problem isn’t there, but after deleting the values from the various AppX and other keys under “Classes”, something did it. Thanks again!

  2. Maur

    Not sure if this went through the first time. I deleted the values from the various AppX and other keys under “Classes” except for “Applications”, and one of those fixed it. It took me hours of getting nowhere with worthless search engine results before finding this. Thank you!

  3. Yannick

    The comma in for example “SetUserFTA .gif, IrfanView.GIF” is too much. It should be “SetUserFTA .gif IrfanView.GIF”. Otherwise you create a key in registry with “.,” instead of “.”.
    That happened to me. => Win11 22H2

Leave a Reply