How to set the default program for opening files without an extension in Windows?
|
|
Normal files with an extension can have a program associated however this is not the case with files that don't have an extension. If you double click on one and select an application and check the box to always use that application it is ignored and every time you select a file you have to choose the application. You can force this using the registry:
If you now double click on a file with no extension it will open with the application selected. To check what an existing application used look at its entry under HKEY_CLASSES_ROOT, e.g. HKEY_CLASSES_ROOT.doc uses Word.Document.8 so if you wanted this as your default editor you would change HKEY_CLASSES_ROOT.(Default) to Word.Document.8. Any method which avoids the need to edit the registry is as follows:
|
|||||||||||||
|
|
With the command line:
To give credit, I learned this from the vim wikia here and here Extra info: Instead of
You will need to properly escape them though:
To set the icon to be the same as .txt files (I didn't do this, since it automatically made the files' icons display as Notepad++ files):
To undo, you can read the
|
|||||||||||||||||||
|
|
This is an example of .reg file for getting Notepad to open unknown file extensions. Create a new text file with an extension of .reg, cut and paste this into it, then double click to run and it'll put it into the registry.
|
|||||||||
|
This enables the PFE editor to open files with no extension if you have PFE on your C drive. |
||||
|
|
|
You can also use NirSoft FileTypesManager:
|
||||
|
|
|
Pauk's answer didn't work for me, I had to use instead:
Note the double backslashes on the exe path. |
|||
|
|

