Help: Safely have several N++ versions on PC; how to access each?
-
Hi all…Can any knowledgeable user pls HELP/comment: I’ve just joined this board, to post a question: N++ crashing when I run as Admin (first & only occurrence). No solution yet, so I’m forced to reinstall/download new, to continue my work. NEW question: I wish to retain my original N++, so I have access to all those files, but add a new version to my PC. — Is it “safe” to have several versions of N++… If yes, how do I access each separately, hopefully via a shortcut? (Am hoping that this is not an unusual/weird practice) — THANK YOU for any knowledgeable advice!
-
Is it “safe” to have several versions of N++
Yes, at any given moment when I’m helping people in the forum, I have between 1 and 10 different Notepad++ unzipped to various locations.
To make multiple Notepad++'s work, you can have no more than 1 “installed”; the rest need to be portable unzips in a different location (for example, I have a
c:\usr\local\apps\npp\
directory, where I unzip all my portable Notepad++ instances) – so use the portable/zip version when downloading from the official https://notepad-plus-plus.org/downloads/ .-
The “installed” version will still be in
c:\program files\notepad++
or whatever, and likely has its config files in%AppData%\Notepad++\
. -
The portable copies will have their config files in the same directory as the notepad++.exe resides.
-
If you have any Windows file associations (open
.txt
with Notepad++ automatically, or what have you), those will still point to the original installation, so you cannot use Windows double-click to open a file in the portable copy; double-click will only open in the installed copy of Notepad++. -
To edit a file in the portable copy, go into the portable directory, and run notepad++.exe from there; then you can use the normal internal methods of opening a file (File > Open, using the Open button, dragging a file from Windows Explorer into Notepad++)
- if you have *Settings > Preferences > Multi-Instance set to always open in mono-instance (the default setting), then once the portable Notepad++ is open, double-clicking the associated file in Windows Explorer should use the already-open portable instance of Notepad++ instead of trying to also launch the installed copy.
how do I access each separately, hopefully via a shortcut?
You should already have your shortcut for the installed Notepad++. For the portable copy, just use normal Windows methods to create a shortcut to the
notepad++.exe
in the portable directory.so I have access to all those files
In general, there is nothing to prevent you from editing the same files with a new copy of Notepad++ as with the copy that was previously installed currently on your machine – I am not sure why you would be worried about that at all.
-
If you want to edit a normal file from somewhere on your hard drive, just open that file; there is nothing preventing that
-
If you want to open one of the
new #
files from your installed instance: unless you closed the tabs in the installed instance, the%AppData%\Notepad++\backup
directory should have those; to stay safe, I would copy those to some known location on your drive, and give the files a proper name rather thannew #@yyyy-mm-dd_hhmmss
-
If you want to know the list of files that you had open in the installed Notepad++:
- run the portable Notepad++
- in the portable Notepad++, open the file
%AppData%\Notepad++\session.xml
session.xml
will list all the files that were open in the installed Notepad++; you can then re-open those files in your portable Notepad++
-
-
BTW, @L-Smxxx ,
I meant to link you to the FAQ about
%AppData%
(https://community.notepad-plus-plus.org/topic/15740/faq-desk-what-is-appdata), so you would understand that you could paste the%AppData%\...
directories in normal Windows (and Notepad++) file/directory chooser windows and have it go to the right place. -
@PeterJones said:
To edit a file in the portable copy, go into the portable directory, and run notepad++.exe from there
I’m not sure of the context Peter means this in, but if another Notepad++ is currently running, this won’t work to start the portable N++. What will happen is that an already running version will get switched to.
To truly start another instance, you must add the
-multiInst
command-line option to the invocation. This means that a simple double-click on the .exe from Explorer won’t do it – and it probably means you’d want to create a shortcut file where you can add command line parameters.Again, not sure the context Peter was going for with his explanation, but I thought I’d point this out.
-
I’m not sure of the context Peter means this in,
Sorry, I thought I had phrased things in a way that it was implied/understood that the installed copy wasn’t running. I didn’t think that @L-Smxxx wanted to run both the installed and the portable simultaneously; I thought he wanted both installed, but only running one at a time.
-
Well, maybe it isn’t that big of a stretch to imagine the OP coming back here and saying “When I double click a portable’s .exe, it just takes me back to the installed’s window instead of running – what gives?!?” :-)
-
Thank you very much, Peter! — Appreciate your patient(!) assistance!