Portable version and APPDATA
-
Hello,
Since the change of plugin management, I had to switch to the portable version because a user without admin rights could not install his plugins.
Now I am facing another problem. the config is stored in the installation repository and no longer in% appdata%. For multi user workstations there is a security problem. If a user opens a document that is stored in their secure space and another user changes their session and opens notepad ++, they have access to the other user’s latest open content.
Is there a solution to avoid this?
Thank you
-
I don’t use “multi user workstations” but I assume deleting the
doLocalConf.xml
from portable install directory should do what you want. -
Thanks for your reply.
If I do that, a user without rights will no longer be able to install these plugins -
But isn’t that true with a file doLocalConf.xml in place as well?
I mean, the plugins do always get installed in the same directory, right?
Only the config would be user specific.
If I’m at home I could some tests but right now, at work,
I don’t have the rights to create an additional user. -
@Laurent-Duvoisin said in Portable version and APPDATA:
Thanks for your reply.
If I do that, a user without rights will no longer be able to install these plugins-
I unzipped a fresh copy of 7.8.1-64bit portable into
c:\usr\local\apps\npp-other\npp.7.8.1.bin.x64-appdata
-
Run that copy, and change a setting (so that I could see session.xml and config.xml changed timestamp). Exit.
-
Next, I deleted doLocalConf.xml from that directory.
-
Run again: Debug Info now shows:
Notepad++ v7.8.1 (64-bit)
Build time : Oct 27 2019 - 22:57:19
Path : C:\usr\local\apps\npp-other\npp.7.8.1.bin.x64-appdata\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1903
OS Build : 18362.476
Plugins : mimeTools.dll NppConverter.dll NppExport.dll -
Change a setting.
%AppData%\Notepad++\
is now populated with my personalized settings. -
Install a plugin using Plugins Admin (I chose NppExec).
-
The plugin-install automatically re-started Notepad++. The plugin was in
c:\usr\local\apps\npp-other\npp.7.8.1.bin.x64-appdata\plugijns\NppExec
where it belongs. -
Run Plugins > NppExec > Execute with the temporary script
echo Hello World
, which echoes properly. -
Close Notepad++. Look at
%AppData%\Notepad++\plugins\Config
: it contains theNppExec.ini
,npes_saved.txt
, andnpes_temp.txt
configuration files. There are no NppExec config files inC:\usr\local\apps\npp-other\npp.7.8.1.bin.x64-appdata\plugins\Config
, because it’s properly using%AppData%
with the portable Notepad++
deleting
doLocalConf.xml
did exactly what I would hope and expect.As long as your portable copy was unzipped into a folder where everyone has write-access, once you delete
doLocalConf.xml
, everyone will have their own configuration in the per-user%AppData%
hierarchy, but all will be running the same local copy. (They will also all have access to the same plugins, because plugins will be installed (by any user) in the local unzip folder, not in the per-user%AppData%
.
But this should be okay, because the plugins’ configs should stay per-user in%AppData%
)If you really need each user to have their own plugins as well as their own configuration files in
%AppData%
, I might recommend doing what I’ve seen some other apps do when they ask “do you want to install for everyone or per-user”: when you select per user, it goes in a subfolder of%LocalAppData%\Programs\
… (*) So, for you as the admin, you could unzip a copy of Notepad++ into each user’s%LocalAppData%\Programs\
, and then delete%LocalAppData%\Programs\Notepad++\doLocalConf.xml
; then each user would have their own copy; their config settings would go in%AppData%\Notepad++
, and the individual plugins would go into%LocalAppData%\Programs\Notepad++\plugins
.(*: if you are unfamiliar with
%LocalAppData%
, it resolves toC:\Users\<username>\AppData\Local
or the appropriate per-user folder, vs standard%AppData%
, which resolves toC:\Users\<username>\AppData\Roaming
or equivalent.) -
-
@PeterJones Thank you very much, I will try tomorrow