Community
    • Login

    Portable version and APPDATA

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Laurent DuvoisinL
      Laurent Duvoisin
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse
        last edited by

        I don’t use “multi user workstations” but I assume deleting the
        doLocalConf.xml from portable install directory should do what you want.

        1 Reply Last reply Reply Quote 0
        • Laurent DuvoisinL
          Laurent Duvoisin
          last edited by

          Thanks for your reply.
          If I do that, a user without rights will no longer be able to install these plugins

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • EkopalypseE
            Ekopalypse
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @Laurent Duvoisin
              last edited by PeterJones

              @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

              1. 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

              2. Run that copy, and change a setting (so that I could see session.xml and config.xml changed timestamp). Exit.

              3. Next, I deleted doLocalConf.xml from that directory.

              4. 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

              5. Change a setting. %AppData%\Notepad++\ is now populated with my personalized settings.

              6. Install a plugin using Plugins Admin (I chose NppExec).

              7. 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.

              8. Run Plugins > NppExec > Execute with the temporary script echo Hello World, which echoes properly.

              9. Close Notepad++. Look at %AppData%\Notepad++\plugins\Config: it contains the NppExec.ini, npes_saved.txt, and npes_temp.txt configuration files. There are no NppExec config files in C:\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 to C:\Users\<username>\AppData\Local or the appropriate per-user folder, vs standard %AppData%, which resolves to C:\Users\<username>\AppData\Roaming or equivalent.)

              Laurent DuvoisinL 1 Reply Last reply Reply Quote 3
              • Laurent DuvoisinL
                Laurent Duvoisin @PeterJones
                last edited by

                @PeterJones Thank you very much, I will try tomorrow

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors