I have problem with opening .txt file on windows-10. Notepad++ is default program to open .txt files, but when there is notepad++ application already running in other virtual desktop OS will automatically switch me to that other application instance and open file in other desktop. I want to open new instance of notepad++ in my current desktop. Is there a way to accomplish that?

[EDIT] Multi-Instance is one suggested solution, but this is bad in way that you loose tab functionality. I don't want my taskbar clogged with n++ processes.

One n++ for all desktops - this is killing the purpose of using multiple desktops in first place - keep different work processes and task separated.

  • 1
    The virtual desktop feature within Windows does not work in this way, a single process is still going to exist, accross all desktops. In other words it does not work the way you believe it shoudl work.
    – Ramhound
    May 9, 2016 at 12:48
  • 1
    you could try to open in multiple instance mode, here a little hint Notepad++ always in multi instance - if somehow defeats the tab functionality - but it could accomplish what you want to achieve...
    – Zina
    May 9, 2016 at 13:06
  • 1
    @Ramhound I understand that W10 VD works this way, but this way sucks big time and I wan't to hack it. May 10, 2016 at 6:18
  • @Zina Yea, I don't wanna loose tab functionality. It works almost OK if I use: Multi-Instance: "Open session in a new instance of Notepad++" and then open new app in each desktop where i plan to use npp. As it is pinned to taskbar it is not bad, but still not perfect solution. May 10, 2016 at 6:40
  • 2
    You were offered two solutions so far. Please edit the question and extend it by details what exact behavior do you expect and what is the problem with solutions offered in comments. Then maybe I will retract my downvote, but currently I need to put it, because the question is unclear.
    – miroxlav
    Sep 6, 2017 at 22:19

1 Answer 1


Here is the hack that may work for you.


  1. Two Portable Notepad++ in two separate folders. (It may work with one NPP installation, but two separate Notepad++ seem to be cleaner approach. You may also not need Portable Notepad++, but it may be easier that way.)
  2. Two or more virtual desktops

How does it work: (I have animated GIF at the end to demonstrate this steps).

  1. Open Notepad++ folder on the first Virtual Desktop.
  2. Right click on Notepad++.exe to create a shortcut.
  3. Right click on the newly created shortcut and go to its properties.
  4. Add -multiInst in the target section. (The text is case-sensitive, and there is a space at the beginning.)
  5. Click OK to close the properties.
  6. Double click on the shortcut.
  7. It should open the new instance of Notepad++ in that virtual desktop.
  8. Now switch to another Virtual Desktop. Open its own Notepad++ folder. And follow steps 2-7.
  9. To keep things organized, I kept two folders, VM1 and VM2 with the notepad++ folders in them. (VM being Virtual Machine)

Some Final Notes:

  • This would work as long as the Notepad++ window in a virtual machine was Active, i.e. you had touched it at least once.
  • This is because when you open text file (or your source code files), it opens in the Last Active instance of Notepad++.
  • I am assuming that you are not changing your virtual desktops very frequently, since that would nullify the actual purpose of virtual desktops.

Here is the animated GIF.

  • You can right click on GIF and open it in new tab to see the steps clearly.
  • GIF shows steps on one virtual desktop, you need to replicate it on the other too.

    enter image description here

I hope it is helpful. Thanks.

  • Super detailed answer, will try and see how it works. "Last Active instance" part is a little downer, but i hope I can adapt. Sep 5, 2018 at 7:59
  • Yup. It is a kind of little downer. BTW your question and the approach is pretty interesting. I have not used Virtual Desktop as much as I should. I may try this. Sep 5, 2018 at 16:00
  • +1 Great, thanks! Now I can use npp without the "auto desktop switch" that was driving me crazy
    – Zack
    Apr 24, 2019 at 13:50

You must log in to answer this question.

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