I am creating an MSIX installer for my app and I'm trying to set it as the default app for a couple of file extensions. I am getting mixed results. What I have found is that there are 3 states that a file type association can be in when you look at Default Apps
default apps by file type...
default apps by file type
listdefault apps by file type
list but is not set with a default appdefault apps by file type
list and IS set with a default appIn the first two cases, the MSIX installer will successfully associate the given file types with the app but in the third, it will not take over if an app is already assigned. So the question is this: Is this the expected behavior or is this not working as intended? If it is the expected behavior, what else is required so that the MSIX installer will set the proper file association if one is already assigned?
Here is the code for the appxmanifest.xml that sets the default app for the file extension:
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="fileassociations">
<uap:SupportedFileTypes>
<uap:FileType>.ext1</uap:FileType>
<uap:FileType>.ext2</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
Your three cases are absolut correct and i think this is a by-design feature from Microsoft since Windows8 or Windows10. The user has the final decision, which program he will use for the file. In your third case the user has two programs for one file associations. When you as a admin deploy a software to the user, you can not say "hey, this is the new default app for the this file assocation".
So you must deinstall all other application with the same file assocation, so that case three will become case 2 or you create a group policy and an AppAssoc.xml: [https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-configure-file-associations-for-it-pros/ba-p/1313151][1]
best Regards