I often update my hosts file, one of those text files that has no extension, and I’m always prompted to choose a program to open it. I always choose the same, but the prompt always comes back. Other file types are remembered, not this one.

I found a fix at Superuser.

Open a cmd window as an admin, and type

assoc .=”No Extension”

press enter (return key)

ftype “No Extension”=”c:\windows\system\notepad.exe” “%1"


(^^ Don’t forget to include the “f” in that first command. it’s not a typo. Also, you can set this up with something other than notepad if you want.)

press enter again

One more little problem in life solved. Hope you like.
The full topic is laid out in the link below.