In case you've never thought about default programs before, the concept is pretty straightforward.
#Set default app to open files how to#
Here's how to change default settings and apps in Windows 10. While you can't change everything, it's possible to adjust much of Windows 10's out-of-the-box behavior. If you don't want to use a Microsoft account to log in, dislike Bing search baked into the OS, and hate Edge, you'll be happy to know you can change all of these. Sadly, I selected Python from the dialog, before taking a look at the reg keys (and now it works), so I can't do any more debugging (and also, switching users is annoying).As soon as you sign into Windows 10, Microsoft pushes its recommended apps and settings on you.
Not to mention that I've ran into an even stranger problem (for a regular user on my Win 10), for. I can think that the 2 keys above are queried, but I'm 100% sure there's more. I couldn't find anywhere a clear algorithm of how an executable is chosen to run a file with a certain extension.
#Set default app to open files windows 10#
: Windows 10 – How to configure file associations for IT Pros? which mentions the command:ĭism /online /export-defaultappassociations:"file.txt".So apparently, it's more than meets the eye (over the years, I got used to MS's way of doing things which in some cases seems to be (but maybe it's me who didn't have all the pieces) ilogic). In Choose default apps by file type, Notepad++ is shown.It is actually opened by Notepad++ (in cmd and PS).txt only), in spite of the above did a little more digging on the. Yet a big surprise: Notepad++ and not Notepad is used to open txtfile (. Apparently, there is a (pretty dark) nebula on this topic, that my knowledge wasn't yet able to "decipher".My user has (super) administrative privileges, but I guess they shouldn't impact differently depending where the action is performed from ( cmd or UI (if possible)), in other words users that don't have the required privileges, won't be able to do it, no matter what they would try.ftype ZZZFile=%SystemRoot%\system32\notepad.exe %1.zzz extension, there are only 2 commands that need to be remembered from this whole (and pretty long) answer: In order to open with notepad.exe files having. Try opening the file again (from cmd), and voilà: Txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1Į:\Work\Dev\StackOverflow\q052008516>:: Associate ZZZFile with notepadĮ:\Work\Dev\StackOverflow\q052008516>ftype ZZZFile=%SystemRoot%\system32\notepad.exe %1 Again, check if the file type is not already associated (this only makes sense if the file type existed before previous step): e:\Work\Dev\StackOverflow\q052008516>:: As usual, no output means no associationĮ:\Work\Dev\StackOverflow\q052008516>ftype | findstr ZZZFileĮ:\Work\Dev\StackOverflow\q052008516>:: Same thing for txtfileĮ:\Work\Dev\StackOverflow\q052008516>ftype | findstr txtfile zzz=ZZZFileĪssociate the file type ( ZZZFile, from previous step) with a command. First, check if such association doesn't already exist: e:\Work\Dev\StackOverflow\q052008516>:: No output means no associationĮ:\Work\Dev\StackOverflow\q052008516>assoc | findstr ".zzz"Į:\Work\Dev\StackOverflow\q052008516>:: Same command for a different extensionĮ:\Work\Dev\StackOverflow\q052008516>assoc | findstr ".txt"Į:\Work\Dev\StackOverflow\q052008516>:: Create a new FileType (ZZZFile) and associate our extension with itĮ:\Work\Dev\StackOverflow\q052008516>assoc. That will yield the dreaded dialog:Ĭreate a new file type and associate our extension with it. Try opening the file ( DblClick) from a file browser (it's not relevant, but I use Total Commander), or by typing its name in cmd.
zzz fileĮ:\Work\Dev\StackOverflow\q052008516>echo Some dummy text>file.zzz Create a new file that the OS doesn't know anything about.
I've tried it 1 or 2 years ago, I just tried it now, so it works regardless of Win (10) version. I think this question would be more suitable for SuperUser (well, unless you want to do it via a program :) ).Īnyway, here's a way of doing things from console ( cmd).