How to set up default programs in Windows 11

Updated: September 15, 2021

Mic drop: I believe I will stop using computers much sooner than I previously thought. Not in the fullblown, dramatic sense, of course. None of that going back to the roots, eco-caveman, society-be-damned thing. No, nothing so drastic. But I will scale down my interaction with machines to the point I only use them for the bare necessities, because I'm getting pretty annoyed by the deterioration in quality and intelligence of software solutions being peddled and vomited upon the world. Our topic for the day: default programs.

Default programs, or applications, if you will. In Windows. Ah. Here's another shiny example of how not to do it right. Recently, there's been a spat of articles about Microsoft making it harder for common users to switch default apps in Windows 11. Except, this is yesterday's news. It's been hard for normies to do it for a long while now. I've already covered the issue in my Dev review of Windows 11, but I guess my tone isn't "photogenic" enough for mass consumption. Nor is this Windows 11 exclusive. There is nothing cardinally new in how deeply annoying Windows is in this regard. Windows 10 does the same thing. Use Edge, use Edge, use Edge. Klaxons all over the place. So I thought, ok, is there a way to configure Windows default apps from the command-line, and avoid the noise and nonsense?

So what are we talking about?

First, the default association of file types to specific programs. Every operating system has its defaults. But then, when you switch away from those defaults, that's when fun things happen. I already showed you how Microsoft would reset my IrfanView image file associations, many times over. I already showed you how, even though I set certain programs to be default, Windows 10 would STILL occasionally pop its question, mostly when it comes to media or browser functionality. Not just Edge. Video files, too!

App reset

Back in 2018, fresh install, IrfanView.

Default app nag

Desperation, much?

In Windows 11, the only real difference is that the Settings menu now has a somewhat different, slightly more convoluted workflow for assigning default applications to specific file types, and vice versa. In Dev builds, this functionality is a bit wonky and rather slow, but not cardinally different from Windows 10. You can still right-click on a file, Open with, and all that. Boring. But then real problem is in trying to be efficient about it!

The sad state of assoc, ftype and dism

Older versions of Windows offered a range of command-line tools (assoc, ftype) to assign or change file associations, so you could open your files in the desired program of choice. You could also do that via Group Policies, or registry, by using a crafted XML file, which tells the system how to handle different file types. Not the most elegant of solutions, but easily scriptable.

File assoc example

This does nothing at all. Similarly, you could try:

Dism.exe /online /Export-DefaultAppAssociations:C:\PS\DefaultAssoc.xml

Deployment Image Servicing and Management tool
Version: 10.0.22000.1

Image Version: 10.0.22000.132

The operation completed successfully.

Open the XML, make manual changes to whatever file types you like, then import.

<?xml version="1.0" encoding="UTF-8"?>
  <Association Identifier=".3g2"
   ApplicationName="VLC media player" />
  <Association Identifier=".3gp"
   ApplicationName="VLC media player" />
  <Association Identifier=".ac3" 
   ApplicationName="Groove Music" />
  <Association Identifier=".adt"
   ApplicationName="Groove Music" />
  <Association Identifier=".adts"
   ApplicationName="VLC media player" />

Dism.exe /Online /Import-DefaultAppAssociations:C:\PS\DefaultAssoc.xml

Deployment Image Servicing and Management tool
Version: 10.0.22000.1

Image Version: 10.0.22000.132

The operation completed successfully.

From Windows 10 20H2, none of these solutions really work for an existing user. If you want to make changes, you can, except, the system will totally ignore them. Moreover, Windows now also assigns a hash to any program & file association, and this hash is used to verify that the change is legit, i.e., done by the user. So you can't really go about manually mucking through the registry, because Windows will ignore your manual changes, as they won't match the hash. How is the hash computed, beats me.

Hash, in the registry

And so, no matter what I tried, I ended up having to go back to the Settings GUI, and making changes there. Slow, cumbersome, and another punch below the efficiency belt. But then, modern operating systems are designed to be annoying rather than productive.

Any real solution?

No. None that I could find, and that would be a good, simple, reasonable alternative to the issue above. However, you can express your dissatisfaction in a slightly different way. First, be methodical and disciplined. Make sure you correctly set every program on your system, and right-click on any file type in Explorer, so you can give them the right handler (and permanently so). Second, you should disable or uninstall the annoying default programs if they keep pestering you.

For instance, while I find Edge to be a pretty decent browser overall, it's not allowed to run on my Windows boxes via IFEO. This is because you get recommendations to use Edge in the headerbar of Settings, you see it in Settings, you see it + promo message when you try to open browser-capable files. That's all too annoying and desperate. Solution? Edge can't run. Simple. And this way you won't accidentally open your SVG or PDF files in the wrong program. Done. Good? No. Necessary? Unfortunately yes.


Interestingly, Windows 10 did implement a semi-reasonable solution to the ancient problem by giving you a small list of default functionality types (like Video, Music, etc), and you could (mostly) assign the right programs to handle those. Now, Windows 11 goes back to the old and convoluted way of per-protocol and per-suffix handling, which is cumbersome, and maybe even confusing, as there's no consistency. Worst of all, if you really want to be efficient in this process, you can't.

Currently, the best way to actually tell Windows 11 which apps should open which files, you ought to do that during the installation of desired programs (then the software does the hard work for you in the background), followed by an occasional right-click > Open with for those file types that may have fallen through the net. This isn't simple, easy or pretty, but that's what it is. I wished this article had a mind-blowing productivity trick, but it doesn't. Hopefully, this ain't the start of a long trend of useless and pointless changes in the operating system stack, further alienating the techies and doing nothing for the hordes of clueless, low-IQ masses. On second thought ... Hold on.