1

I recently formatted and then reinstalled everything, but oddly now, Windows 7 refuses to let me set Notepad++ as the default .TXT editor.

I try to set the "open with" file as usual:

  • right click a .TXT file
  • Open With...Choose DefaultBrowse
  • paste "C:\Program Files (x86)\Notepad++\notepad++.exe"

... but Notepad++ doesn't show up in the dialog (image below), and the file instead opens with lame old Notepad.exe.

img

However when I open "C:\Program Files (x86)\Notepad++\notepad++.exe" from the ![Windows Key][oldwinlogo]+R Run dialog, Notepad++ opens without a problem.

Also, certain files' context menu have Edit with Notepad++, which also works fine.

From my registry, in case it's relevant:

[HKEY_CLASSES_ROOT\.txt]
  Default="txtfile"
  Content Type="text/plain"
  PerceivedType="text"

[HKEY_CLASSES_ROOT\.txt\PersistentHandler]
  @="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\.txt\ShellNew]
  ItemName="@%SystemRoot%\system32\notepad.exe,-470"  
  NullFile=""

I tried rebooting... Any ideas?

Edit: I had also tried the editing the Associations directly in NPP as admin, without success. Note that I'm using Windows 7.

(I just got all my N++ setting/themes/plugins/ftp/etc all painstakingly setup, and it was working fine until I tried it this morning, so I'm hoping for a fix other than reinstalling N++.)

Mureinik
  • 3,974
  • 11
  • 28
  • 32
ashleedawg
  • 586
  • 1
  • 7
  • 21
  • 2
    What happens when you try to browse to that location? – Gerard H. Pille Nov 11 '18 at 07:41
  • 1
    In an open cmd window, does `assoc .txt` return `.txt=txtfile` and `ftype txtfile` return `txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1` ? – LotPings Nov 11 '18 at 08:16
  • @GerardH.Pille - no difference browsing or pasting. – ashleedawg Nov 11 '18 at 09:36
  • @LotPings - correct. `assoc .txt` = `.txt=txtfile`, `ftype txtfile` = `txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1` – ashleedawg Nov 11 '18 at 09:38
  • @DavidPostill - **Not a duplicate** - I'm using Windows 7, and plus I had already tried [your answer](https://superuser.com/a/1324371/774713) to the other question (NPP file assoc as admin) without success. – ashleedawg Nov 11 '18 at 09:56
  • Sometimes, Windows registry messes up the executable path/name. I would suggest that you copy `notepad++.exe` and paste it in the same directory (`C:\Program Files (x86)\Notepad++\)`. Rename it as something else, for example, `notepad_plus.exe`. Now try to `Open with` and browse to this location. You should be able to see the `new executable`. Let me know if it works. – NotepadPlusPlus PRO Nov 12 '18 at 15:46

0 Answers0