I can’t find a method to programmatically change default/associations for file extensions (e.g. .mp4 open with VLC) or protcols (e.g. https open with Firefox) on existing user accounts. I can’t find anything that works other than manually going into Settings → Apps → Default apps and changing each extension and protocol by hand. This is a drag, especially given the number of systems we’re likely to be moving from W10 to W11 this year.
It looks like most of the registry keys that have historically helped with this have a “Hash” key to resist tampering that varies between users [Ref]. Similarly, cmd.exe commands assoc and ftype don’t seem to take effect even after a reboot.
What options do I have for automating this process on Windows 11 Home and Pro editions? I would strongly prefer not to use closed source 3rd party tools like SetUserFTA.exe.
Thank you, but that only works for new accounts doesn’t it? I’m hoping for something that can be run repeatedly on existing accounts to maintain the desired associations.
Fortunately, a friend found a couple powershell scripts by axpokl and default-username-was-already-taken that didn’t work for me individually on W11, but I’ve combined them in a fork of default-username-was-already-taken’s script. With the code borrowed from axpokl, the fork works as advertised for me in W11 en-US 22H2 and 24H2. It doesn’t work for protocol defaults yet (e.g. http), but I plan to take a swing at that later.