2

Is it possible to have a default text editor for file types that have no app associated, and especially for files without extension for which we cannot associated an app at all.

For example, double click on a file named file_without_ext, the "How do you want to open this file ?" window is opened but we can see the "Always use this app to open file" checkbox is not available, then, next time we'll have to choose again, and it does not even propose the last used app but default, we always have to click on "More apps" then scroll to the app we want to use and this is very annoying when dealing frequently with files without extension.

Then, anybody knows if there is a way, either to perform an app association for files without extension or to have a default app that is a text editor for non-associated file types (with or without extension).

Edit: as answered below, I forget to mention using notepad++ from right click is my back-up solution, I'll edit my question with that, but still, for example when opening an archive with 7zip, double clicking on a file without extension (then not associated with any app) an error message is displayed, I then have to extract it somewhere and only then I can open it with notepad++.

Edit2: thanks to @Madhubala I found the solution, at least for me opening file without extension with notepad++:

  • Start the registry editor (regedit.exe)
  • Move to HKEY_CLASSES_ROOT
  • From the Edit menu select New -> Key
  • Enter a name of '.' and press Enter (don't type the quotes)
  • Select the new '.' key
  • Right click and select New -> Key
  • Enter a name of 'shell' and press Enter (don't type the quotes)
  • Select the new 'shell' key
  • Right click and select New -> Key
  • Enter a name of 'open' and press Enter (don't type the quotes)
  • Select the new 'open' key
  • Right click and select New -> Key
  • Enter a name of 'command' and press Enter (don't type the quotes)
  • Select the new 'command' key
  • Double click the (Default) value and set "C:\Program Files\Notepad++\notepad++.exe" "%1" (here actually with the "", changing path if you installed notepad++ elsewhere)
  • Click OK

This will look like this: Registry Editor screenshot

Thanks.

4
  • The association for an application needs the extension so that the Windows Default App section can function properly. So you cannot do as you wish above with no extension.
    – John
    Jan 28 '20 at 14:40
  • I think the only option here is to download a text editor (such as notepad++) that will appear in every files "right-click" menu.
    – Ecstasy
    Jan 28 '20 at 14:46
  • I agree with that. There are a variety of apps that are in the right context menu. Ultra Edit does this also. But to pick by app requires an extension.
    – John
    Jan 28 '20 at 15:00
  • Thanks to both of you, I forget to mention using notepad++ from right click is my back-up solution, I'll edit my question with that, but still, for example when opening an archive with 7zip, double clicking on a file without extension (then not associated with any app) an error message is displayed, I then have to extract it somewhere and only then I can open it with notepad++.
    – gluttony
    Jan 29 '20 at 7:01
2

From Windows IT pro:

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:

  • Start the registry editor (regedit.exe)
  • Move to HKEY_CLASSES_ROOT
  • From the Edit menu select New - Key
  • Enter a name of '.' and press Enter (don't type the quotes)
  • Select the new '.' key
  • Double click the (Default) value
  • Change to the HKEY_CLASSES_ROOT used to open, e.g. NOTEPAD for the notepad.exe application NOTEPAD
  • Click OK

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:

  • Open Explorer - View - Folder Options... - File Types - New Type:
  • Description of type: Text (any description, you can type in)
  • Associated extension: . (just a period)
  • Actions: - new...
  • Action: open
  • Application used to perform action: c:\winnt\notepad.exe
  • Click ok, then ok again
2
  • Thanks a lot for your answer, however, for me the way you just add a '.' item did not worked for me, but as you mentioned too I was able to see how was done another file type associated with notepad++, and in fact I had to add 'shell' key under '.', then 'open' key under shell and finally 'command' key under open for which I put '"C:\Program Files\Notepad++\notepad++.exe" "%1"' to '(Default)' value. I'll edit my question with this, and, I would definitively have upvote you but I'm too low on reputation...
    – gluttony
    Jan 29 '20 at 7:16
  • Nice. Here's the PowerShell command equivalent. Must be run from an Admin console. (gi 'Registry::HKCR\').CreateSubKey('.\Shell\Open\Command').SetValue('','"C:\Program Files\Notepad++\notepad++.exe" "%1"') Jan 29 '20 at 8:51
1

An easy way to have a text editor available for any item is to put a shortcut to it in your SendTo folder (shell:SendTo in the Explorer Address bar):

enter image description here

enter image description here

1
  • That's pretty what suggested comments on my question, for which I added precision since this is almost what I'm using as a backup solution, I do right click -> Edit with Notepad++, but as mentioned too there are still problems when opening with 7zip. Thanks anyway, I would have upvote since it can help somebody else but I'm too low on reputation...
    – gluttony
    Jan 29 '20 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.