• Login
Community
  • Login

Stuck in "Administrator" mode...how to get out?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
35 Posts 10 Posters 11.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.
  • M
    Meta Chuh moderator @andrecool-68
    last edited by Jan 7, 2019, 6:15 PM

    @andrecool-68

    i think that administrator detection of newer versions of notepad++ relies on an active user access control.
    what happens if you re-enable uac and set it to default for a test, then reboot ?
    does it still say [administrator] in your portable 7.6.2 or is it gone then ?

    alt

    A 1 Reply Last reply Jan 7, 2019, 6:24 PM Reply Quote 1
    • A
      andrecool-68
      last edited by Jan 7, 2019, 6:16 PM

      True UAC is disabled!

      1 Reply Last reply Reply Quote 0
      • A
        andrecool-68
        last edited by Jan 7, 2019, 6:22 PM

        Yesterday I reinstalled the 7x64 operating system, and turned it off myself.

        1 Reply Last reply Reply Quote 0
        • A
          Alan Kilborn @Meta Chuh
          last edited by Jan 7, 2019, 6:24 PM

          @Meta-Chuh

          Here’s how that screen looks for me:

          Imgur

          A 1 Reply Last reply Jan 7, 2019, 7:48 PM Reply Quote 2
          • A
            andrecool-68
            last edited by Jan 7, 2019, 6:30 PM

            1 Reply Last reply Reply Quote 1
            • A
              Alan Kilborn @Alan Kilborn
              last edited by Jan 7, 2019, 7:48 PM

              Not sure why people are upvoting my UAC screenshot. I guess I should say that I didn’t change that setting in any way and just posted it here so Meta Chuh could see what I have and what I’ve always had there. My problem still exists (just to be clear).

              M 1 Reply Last reply Jan 7, 2019, 8:25 PM Reply Quote 0
              • P
                PeterJones
                last edited by Jan 7, 2019, 8:01 PM

                I tend to upvote good answers, or replies that ask questions I think are worth asking, or replies that directly and informatively answer those questions or add useful information to a discussion: knowing that having UAC enabled does not fix it for you is useful to the discussion – it says that “well, we haven’t yet found the root cause”. It’s unfortunate, but it still helps move the thread forward.

                1 Reply Last reply Reply Quote 2
                • M
                  Meta Chuh moderator @Alan Kilborn
                  last edited by Meta Chuh Jan 7, 2019, 8:28 PM Jan 7, 2019, 8:25 PM

                  i second that.

                  i gave you an upvote on your screenshot, because you actually took the time to do so.

                  of course it doesn’t solve your issue and no one thinks it’s solved just because you got the slider way up and posted it, and for you it’s probably a natural thing to participate to get issues solved, but you’ve seen for yourself how few people do the same and keep reposting the same thing over and over again without trying anything suggested.

                  i simply had to give you an upvote for it, it’s in my nature ;-)

                  1 Reply Last reply Reply Quote 1
                  • A
                    Alan Kilborn
                    last edited by Jan 7, 2019, 9:43 PM

                    Thanks for everyone’s efforts so far…

                    1 Reply Last reply Reply Quote 2
                    • M
                      Meta Chuh moderator
                      last edited by Jan 7, 2019, 9:48 PM

                      @Alan-Kilborn said:

                      Thanks for everyone’s efforts so far…

                      you can’t imagine how hard it was for me to keep my finger off that upvote button right now 😂😂😂 ;-)

                      1 Reply Last reply Reply Quote 5
                      • I
                        Ilkka Lindblom
                        last edited by Jan 23, 2019, 12:00 PM

                        Re-enabling UAC fixed this issue for me. Unfortunately, probably due to all the uninstalls and reinstalls I made while trying to fix it, NPP seems to have lost my saved session. Still I’m glad to have it working again, so thanks a lot people.

                        M 1 Reply Last reply Jan 24, 2019, 1:59 AM Reply Quote 3
                        • M
                          Meta Chuh moderator @Ilkka Lindblom
                          last edited by Meta Chuh Jan 24, 2019, 2:00 AM Jan 24, 2019, 1:59 AM

                          side note to @Alan-Kilborn, as this thread was resurfaced by @Ilkka-Lindblom :

                          i guess my evil upvote finger’s incubation period for “Thanks for everyone’s efforts so far…” is over.
                          my hooked, crooked finger just went haywire on that damned button … and i sincerely hope you won’t notice it at all 😉

                          1 Reply Last reply Reply Quote 3
                          • A
                            Alan Kilborn
                            last edited by Alan Kilborn Apr 8, 2019, 12:51 PM Apr 8, 2019, 12:50 PM

                            So an update to this thread…

                            I’m still in Notepad++ 7.5.x land for my day-to-day Notepad++ usage, but recently I had reason to grab a portable 7.6.4…and I noted that running this one it DOES NOT end up in Administrator mode. By this I mean no [Administrator] in the title bar, and able to drag-n-drop files from a non-admin Explorer window.

                            So just a little nicety waiting for me when I get around to making the Plugin Mgr -> Plugin Admin chasm jump! :)

                            I don’t know what changed in N++ so that this now happens, but I’m going to mark this thread SOLVED if I can.

                            M 1 Reply Last reply Apr 8, 2019, 2:34 PM Reply Quote 2
                            • M
                              Meta Chuh moderator @Alan Kilborn
                              last edited by Apr 8, 2019, 2:34 PM

                              hi @Alan-Kilborn

                              aaahhhhh … the upvote thread, lol
                              i love revisiting things like these 💚
                              i’ve got a big smile on my face right now 😃

                              ps:
                              very intriguing … if 7.6.4 and above don’t trigger administrator mode, but 7.6.3 and below do, could it be that it gets triggered by the existence of a code signing cert on the older versions on your system ?

                              i have never heard about a behaviour like this if something is code signed, but 7.6.4 was the first release without windows code signing. ⁉️

                              A 1 Reply Last reply Apr 8, 2019, 2:41 PM Reply Quote 2
                              • A
                                Alan Kilborn @Meta Chuh
                                last edited by Apr 8, 2019, 2:41 PM

                                @Meta-Chuh

                                I did not do exhaustive testing, but I just went back and tried 7.6.3 and 7.6.2 portable versions. Both of these showed [Administrator] in the title bar. Trying 7.6.4 again…still no [Administrator] there! :)

                                1 Reply Last reply Reply Quote 3
                                • A
                                  anselme16
                                  last edited by Sep 13, 2019, 9:16 AM

                                  good lord the source code determining if the application should launch in administrator is ugly.

                                  here is a clarified version of it :

                                  Notepad_plus::Notepad_plus()
                                  :   _isAdministrator (false)
                                  {
                                      // Determine if user is administrator.
                                      winVer ver = NppParameters::getInstance()->getWinVersion();
                                      if (ver >= WV_VISTA || ver == WV_UNKNOWN)
                                      {
                                          SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
                                          PSID AdministratorsGroup;
                                          if(AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorsGroup))
                                          {
                                              BOOL isAdmin;
                                              if(CheckTokenMembership(NULL, AdministratorsGroup, &isAdmin))
                                                  _isAdministrator = isAdmin;
                                              FreeSid(AdministratorsGroup);
                                          }
                                      }
                                  }
                                  

                                  Sorry i couldn’t resist.

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    Alan Kilborn
                                    last edited by Sep 19, 2019, 7:27 PM

                                    @anselme16 said:

                                    here is a clarified version

                                    I’m confused – why is it ugly? Looking at the existing code (below) I’m struggling to see any significant ugliness or even any real differences between it and your version:

                                    Notepad_plus::Notepad_plus()
                                        /* ... */
                                    {
                                        /* ... */
                                        
                                        // Determine if user is administrator.
                                        BOOL is_admin;
                                        winVer ver = NppParameters::getInstance()->getWinVersion();
                                        if (ver >= WV_VISTA || ver == WV_UNKNOWN)
                                        {
                                            SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
                                            PSID AdministratorsGroup;
                                            is_admin = AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorsGroup);
                                            if (is_admin)
                                            {
                                                if (!CheckTokenMembership(NULL, AdministratorsGroup, &is_admin))
                                                    is_admin = FALSE;
                                                FreeSid(AdministratorsGroup);
                                            }
                                        }
                                        else
                                            is_admin = false;
                                    
                                        _isAdministrator = is_admin ? true : false;
                                    }
                                    
                                    1 Reply Last reply Reply Quote 2
                                    • Alex BoyceA
                                      Alex Boyce
                                      last edited by Nov 15, 2019, 8:35 PM

                                      I have also experienced this issue and I was able to resolve it.

                                      First, I got into this situation with Notepad++ itself. I tried to edit a file in the Program Files tree and was prompted by Notepad++ that I needed to be in admin mode to do that and did I want to restart Notepad++ in admin mode. I clicked Yes and have been in admin mode ever since.

                                      As noted above, drag and drop from a non-admin explorer doesn’t work, but the context menu Open with Notepad++ does, so it wasn’t too much of a hardship. However, it is annoying, so I tried to find out how to turn it off. There is no setting within Notepad++ for it, nor is the compatibility mode tab on the properties sheet checked.

                                      I did a google search and found this thread. One of the suggestions was to search the registry for Notepad++. I tried this and found the magic key. Under HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatability Assistant\Store there was a value named C:\Program Files\Notepad++\notepad++.exe. I deleted this value and restarted Notepad++ and it is in normal mode again.

                                      I have been able to repeat this by dragging a file from the Program Files tree into Notepad++ which works fine, but when you try to save it, the reopen in admin mode prompt appears.

                                      Thanks for the help.

                                      EkopalypseE 1 Reply Last reply Nov 16, 2019, 12:22 PM Reply Quote 4
                                      • EkopalypseE
                                        Ekopalypse @Alex Boyce
                                        last edited by Nov 16, 2019, 12:22 PM

                                        @Alex-Boyce

                                        thx for the information.
                                        Because you ended with Thanks for the help. I’m unsure if you expect an answer
                                        on an implicit question, which I was not able to identify (non-native speaker).

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          Alan Kilborn
                                          last edited by Nov 21, 2020, 12:28 PM

                                          Similar discussion relating to the original topic here is continued IN-THIS-THREAD …

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