Hi
Use option 2, and DISM to set assoc. http://woshub.com/managing-default-file-associations-in-windows-10/
Windows 10 uses another approach for users to set default applications.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
I'm trying to associate my Win32 desktop app with existing file type when it's installed (app uses MSI installer via WiX).
In Microsoft documentation I see two methods to do this:
Experimentation shows that both methods work, but which one should I use?
My app supports Windows 8.1/10/11.
Hi
Use option 2, and DISM to set assoc. http://woshub.com/managing-default-file-associations-in-windows-10/
Windows 10 uses another approach for users to set default applications.
Hello @a b ,
Welcome to Microsoft Q&A!
Both methods work in win10 and win11.
Using SupportedTypes
seems more convenient.
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\ConsoleApplication11.MyProgId"
Name="FriendlyTypeName"
Value="ConsoleApplication11 ProgID"
Type="string" />
<ProgId Id="ConsoleApplication11.MyProgId"
Description="ConsoleApplication11 MyProgId"
Advertise="yes">
<Extension Id="xyz">
<Verb Id="open"
Command="Open"
Argument=""%1""/>
</Extension>
</ProgId>
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\.xyz\OpenWithProgids"
Name="ConsoleApplication11.MyProgId"
Value=""
Type="string" />
----------
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\Applications\ConsoleApplication11.exe\SupportedTypes"
Name=".xyz"
Value=""
Type="string" />
I haven't tested them in Win8.1 yet, I searched for something, it seems need to pay attention to check HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache.
Thank you.
Junjie
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.