Forum Discussion
jeremy61110
Jan 10, 2023Copper Contributor
MSIX - set as default app for a file extension
Hello.
I'm building an msix package and have found parameters to associate a file extension, as far as I know, with the uap:FileType parameter but that doesn't seem to associate that file type with the installed app. I have also tried with desktop2:AllowSilentDefaultTakeOver="true" but that doesn't seem to be what I'm looking for either.
Is it possible for the msix installer to associate a file extension with a given file type so that Windows will change the default program for that file extension and run the app that is packaged with msix?
I currently have this code block but it doesn't do this and I don't know what else I should be searching for in the documentation. I have tried with, and without, desktop2:AllowSilentDefaultTakeOver="true" but had no effect since it's description is "If set to true, the app will appear in an "Open With" list, but it won't be the default app for the file type." Please let me know what I'm looking for and if it is possible.
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="fileassociations" desktop2:AllowSilentDefaultTakeOver="true">
<uap:SupportedFileTypes>
<uap:FileType>.foo</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
3 Replies
Sort By
- Aniket_Banerjee
Microsoft
You can learn more about associating your app with a file type - Integrate your desktop app with Windows using packaging extensions - Windows apps | Microsoft Learn.
There were, however, a couple of points which might be a good starting point:
- Extension should be added to Applications (the code block does not specify where it is added)
- You need to use UAP3 as specified in documentation (refer to the example). The code block uses UAP.
- Aniket_Banerjee
Microsoft
We tried this, and it seems to work even with UAP. As mentioned earlier, you need to add Extension to Applications to make it work.
Please share the app package, if it still doesn't work and we will check.
Aniket_Banerjee : Did you mean to say "(in MSIX) does
notsupport file type associations."?