0

In Windows 10 I have the .TXT file extension set to be opened by NotePad++. I also have the Command Line processor SETPATHEXT set to .TXT. If I invoke NotePad++ and select a .txt file from the Open menu the file opens OK. But if I type (or select from File Manager) MyFile.txt, NotePad++ executes but opens a blank page. Thanks for any attention to this. afk

4
  • 1
    Hello, what version of N++? Do other types of files open correctly if you associate their extensions?
    – Destroy666
    Commented Sep 10, 2023 at 15:47
  • Hi, I can't find the ver number but the .exe date is 08/15/2023. All other files work ok. If the filename extension is associated with N++ and also included in SETPATHEXT then it loads automatically into N++ with only the filename entered at the prompt.
    – afk
    Commented Sep 10, 2023 at 16:06
  • I've since eliminated .TXT from the global environment string SETPATHEXE and rebooted but the problem persists.
    – afk
    Commented Sep 10, 2023 at 16:14
  • Thanks for the reply.
    – afk
    Commented Sep 10, 2023 at 18:44

2 Answers 2

1

After I figured out how to get the debug info I noticed that the command line was empty when invoking NPP. The culprit turned out to be a missing calling parameter in the Windows registry.

\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\txtfile\shell\open\command || "c:\Program Files\NotePad++\NotePad++.exe" should have had the parameter "%1" postpended to the link.

. . . \Notepad++.exe" "%1"

Thanks for your time and interest. Austin Kelly

1
0
  • Press WinE to open the Windows Explorer file manager.
  • Right-click on a file with .txt extension.
  • Select Open with...
  • Select Choose another app.
  • If Notepad++ is not shown, choose More apps.
  • Select Notepad++.
  • Select Always use this app to open .txt files.
  • Click OK.
3
  • Hi, I had done that earlier but just to be certain I performed all of the above steps again and found that the settings were already where they should be. Each time I right-clicked on Open the same thing happened - N++ executes but opens a blank page. But when I tried either of the options which utilize the word "Edit" the .txt file opens correctly in N++. We might be on to something. Thanks for the reply.
    – afk
    Commented Sep 10, 2023 at 18:42
  • Try removing Notepad++ as the default editor by making another app, e.g., Notepad, the default, as above. Then set NPP as default again. Commented Sep 10, 2023 at 20:24
  • I tried removing Notepad++ as default substituting WordPad and WordPad worked as expected. But when I reinstalled NotePad++ as default the original problem returned. I also crosschecked the default app in Windows Settings as I was changing them back and forth and each change was picked up on the Settings page as it was made in File Manager.
    – afk
    Commented Sep 10, 2023 at 23:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .