7

I have Notepad++ portable "installed" and if I try to open a file from Windows Explorer that should open with Notepadd++ portable I get the error

Another instance of Notepad++ is already running. Please close other instances of Notepad++ before launching Notepad++ portable.

My problem is I don't want to open a separate instance, I want the file to open with the existing instance.

I found a blog post on how to get around this issue by opening multiple instances http://mattrefghi.com/blog/2010/11/how-to-launch-multiple-instances-of-notepad/ but like I said, I'd prefer the file to open in my currently running Notepad++ window

I am able to drag & drop the file in the existing window and it works, but double clicking won't open the file.

Anyone know a trick to make this work?

3
  • Frankly I'm surprised you can even open one instance by double-clicking with a portable version of an application (because that usually requires registry settings to associate the file extension with a particular application).
    – martineau
    Commented Aug 16, 2012 at 17:14
  • Since NotePad++ is normally single instance, your problem probably has something to do with the technique whatever it is you're using to make it portable utilizes. Seems like you could manually open the second file by using the running instance's File | Open command (Ctrl-O?).
    – martineau
    Commented Aug 16, 2012 at 17:25
  • By just right clicking txt,csv,xml files and selecting open with and then browsing to my portable np++ folder they seem to work just fine. It just won't open new files once it's already open unless i use ctrl-o or drag and drop the file. Commented Aug 16, 2012 at 20:43

7 Answers 7

6

You need to point to the application executable, not to the launcher. If you point to :

X:\PortableApps\Notepad++Portable\Notepad++Portable.exe

it doesn't work and tells you Notepad++ is already running.

But if you point to :

X:\PortableApps\Notepad++Portable\App\Notepad++\notepad++.exe

then everything works as expected.

2
  • Trying to do this with NotePad++ 7.7 32bit. I see no App directory. In fact the only notepad++.exe in the portable directory is \Notepad++Portable\Notepad++Portable.exe
    – Dave
    Commented Dec 1, 2023 at 14:47
  • Thanks. In a million years I'd have never thought of this (despite for years on a Mac dealing with Program.app vs Program.app/Resources/MacOS/program) Commented Jan 22 at 17:59
2

I have seen this issue happen when Notepad++ crashes when it is closed. Although the application window appears to close, the Notepad++ process is still running. You can check the task manager and kill it off from there.

This is usually caused by a plugin. You can move or rename the plugin directory and see if Notepad++ closes cleanly. If it does then add the plugins back one at a time to identify the misbehaving one.

1
  • I went through and cleaned up my plugins but my problem wasn't a residual running instance of np++ but rather an active copy that would not open the file in a new tab. This didn't solve the problem though. Commented Aug 16, 2012 at 20:42
0

This may help. You may change the default program to make sure it always open in portable NPP++. See this

EDIT:

I also like portable apps and setups. I use Liberkey for that. It has a portable file association app that can do the default program without writing to system registry I guess. You may also use portable apps for the same.

3
  • This is actually how I have it set up and it is causing the error. Commented Aug 16, 2012 at 18:42
  • Setting to default program for an extension to a portable app seems like and oxymoron -- the whole point of one being that using it does not change the system configuration and therefore leave a trace.
    – martineau
    Commented Aug 17, 2012 at 1:35
  • @martineau see my edits.
    – Stat-R
    Commented Aug 17, 2012 at 2:09
0

I had the same problem, then I updated my portable Notepad++ to 6.3 Rev 2.

It works just fine now.

0

I had the same problem. In my case 2 installations of notepad ++ were on the harddisk. The portable version was used based on file association, the installed one was pinned to the task bar. When the portable version detected, that the installed one was running already I got that message. Hope that helps...

0

The notepad++ settings for Preferences - Multi-Instance set to Open Session in a new instance of Notepad++ seems to solve this problem for me.

Edit The problem was also the default setup I had for txt files - right click on the file you want to open in an already existing instance of Notepad++ and check if it is using the correct program to open the file.

In my case, I had two 1. Notepad++: A free (GNU) source code editor 2. Notepad++ Portable (PortableApps.com Launcher)

Choosing 1 opened the txt file in the existing instance of Notepad++ if the settings in Preferences - Multi-Instance was set to Default(Mono-Instance)

Choosing 2 cause the error pop-up "Another instance of Notepad++ is already running ....."

0

In my case the issue was, that I already had the 32-bit exe open and the explorer open with was configured to open the 64-bit version.
Just make sore to use the same version everywhere (i.e. there may be a native Windows installation and the 32-bit and 64-bit portable apps, ..

You must log in to answer this question.

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