Community
    • Login

    Admin mode changes

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 18 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.
    • X
      Xan-Kun
      last edited by

      Hello and first of all: thanks for othe software. I am using notepad++ longer than I can remember now :-)

      I recently updated notepad++ and ran into the following situation. since i am not sure if it’s supposed to be like this or just some new windows shenanigans, I am happy about any kind of hint or explanation.

      The general situation

      • opening np++ as normal user
      • opening a file that is readable by user, but onyl writable by admin

      The behaviour before the update:
      When i change the file and click “save”, a dialog appeared that told me np++ has to restart in admin mode. when doing this, everything worked as expected, i save the edit and restart np++ as normal user again

      The behaviour after the update:
      np++ just saves the file!
      I do not know how that is possible or what exactly is going on (not a win sec expert).
      I can happily supply more information and would gladly get the old behaviour back.

      Thanks in advance!

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Xan-Kun
        last edited by PeterJones

        @Xan-Kun ,

        Yes, Notepad++ drastically improved the behavior when trying to save admin-only files in v8.8.6 in October.

        Specifically, in older versions (v8.8.5 and earlier), when it would make you restart Notepad++, there are two conditions:

        1. If you had left the option to save the session snapshot with periodic “backup” enabled, then your changes would be preserved in the periodic “backup”, and when it restarted as Admin (after Windows OS does a UAC prompt, unless you have UAC prompting off), then it would be able to save them. And then you’d accidentally leave it running as Admin, and could accidentally ovewrite any file you wanted, and might mess up your settings. So, a great situation to be in.
        2. But if you had disabled the periodic backup, like many do (see our backup FAQ for reasons why), then when Notepad++ asked if you wanted to restart, you would have to Ctrl+A Ctrl+C to copy all the changes before asking the question it’s currently prompting you for, then then restart Notepad++ (*: and not prompt you about unsaved changes; so if you didn’t do the copy-all already, you just lost minutes or hours of changes; wheee!!!), then see that the file is back to the original (because it couldn’t be saved), and then have to paste in your changes (hoping you hadn’t accidentally hit Ctrl+C on anything in the meantime, losing your file changes), and then do the save. And then you would need to remember to exit Notepad++ and manually restart it (because Notepad++ doesn’t have a “restart in normal mode” button or menu entry when you’re running as Admin) to go back to normal editing.

        And, in v8.8.6 and newer: You would edit a file. When you go to hit save, Notepad++ asks Windows OS for permission to write to the protected file. If you have UAC enabled, then Windows OS will do the UAC prompt to let you know it’s writing to a protected file, and then do it; if you have UAC disabled, then Windows checks if your user is allowed to elevate without asking, and if it does, it automatically elevates and allows Notepad++ to save. But either way, after that save, Notepad++ is back to the normal permissions, and there is no chance you will forget to switch out of Admin mode and/or get your config files messed up. So much better situation.

        Re-enabling the Windows OS UAC prompts (that you disabled at some point) would get you the level of “don’t accidentally save this Admin file” protection you want, without ruining the improvement for everyone who runs without periodic backup or doesn’t want to risk corrupting their config files and doesn’t want to ruin dragging a file from Windows Explorer into Notepad++ because Notepad++ was accidentally left in Admin mode. (It’s also best practice for Windows security. If you are running with your main user who can be elevated without Windows doing a UAC prompt, then as soon as any malware gets on your system, even if it’s only running as your “normal” user, it can access every file on your drive by just telling Windows “but I’m user Xan-Kun, so of course I’ll play nice”. So you are opening yourself to a huge security risk by running without Windows UAC prompts.)

        The change was intentional. The change makes the software better. As a fellow user of Notepad++, I don’t see a good reason to go back to pre-8.8.6 behavior.

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