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.
    • guy038G
      guy038
      last edited by guy038

      Hi, @alan-kilborn, @meta-chuh, @peterjones, @eko-palypse,

      Maybe what I’m about to say sounds silly, as I’m not a coder, ( yet! ), but why not look at the part of N++ code, responsible for the display of [Administrator] in the N++ title bar ?

      Probably, this occurs, ONLY IF several, conditions are, simultaneously, true ! Then, you would have to verify if each of these individual conditions is checked or not, in Alan’s configuration ?!

      Cheers,

      guy038

      Alan KilbornA 1 Reply Last reply Reply Quote 4
      • Alan KilbornA
        Alan Kilborn
        last edited by

        I looked in the registry but didn’t see any weirdness such as Peter suggested. Trying Meta Chuh’s runas command resulted in N++ running and still presenting “Administrator” in the title bar… :(

        1 Reply Last reply Reply Quote 0
        • Alan KilbornA
          Alan Kilborn @guy038
          last edited by

          @guy038 said:

          why not look at the part of N++ code, responsible for the display of [Administrator] in the N++ title bar ?

          Not an unreasonable suggestion at this point. :)

          Here’s how the title bar gets set:

          void Notepad_plus::setTitle()
          {
              if (_isAdministrator)
                  result += TEXT(" [Administrator]");
          

          Which leads back to how _isAdministrator is determined:

          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
          • Alan KilbornA
            Alan Kilborn
            last edited by

            I suppose I will just “live with it”. It appears that however I.T. has my account set up, it isn’t going to play well anymore with Notepad++. Asking I.T. to “fix” what they’ve done would likely be counterproductive as I’d probably end up with a worse situation.

            I remember when computers were engineering tools. I’m not sure what they are now, but I don’t think it is that. :(

            Meta ChuhM 1 Reply Last reply Reply Quote 2
            • andrecool-68A
              andrecool-68
              last edited by

              How is it generally with a user account?
              Here is an example of two programs on the same machine.

              Meta ChuhM 1 Reply Last reply Reply Quote 0
              • Meta ChuhM
                Meta Chuh moderator @Alan Kilborn
                last edited by Meta Chuh

                @Alan-Kilborn

                i think i found something i can reproduce:
                i’ve set up a windows 7 x64 bit test vm with a standard user.
                if i start notepad++ portable or installed, it loads as this default user.

                i’ve then entered the user settings and slided the user access control slider from default down to off (disable uac) and rebooted.

                tadaaaa: from now on i always see [Administrator] in the notepad++ top bar, even if it is not running as administrator.

                maybe it’s the same on your system ?
                maybe the it guy temporarily disabled uac because he was annoyed by it while he was setting up something, and he just forgot or didn’t bother to re-enable it again ?

                1 Reply Last reply Reply Quote 2
                • Meta ChuhM
                  Meta Chuh moderator @andrecool-68
                  last edited by

                  @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

                  Alan KilbornA 1 Reply Last reply Reply Quote 1
                  • andrecool-68A
                    andrecool-68
                    last edited by

                    True UAC is disabled!

                    1 Reply Last reply Reply Quote 0
                    • andrecool-68A
                      andrecool-68
                      last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • Alan KilbornA
                        Alan Kilborn @Meta Chuh
                        last edited by

                        @Meta-Chuh

                        Here’s how that screen looks for me:

                        Imgur

                        Alan KilbornA 1 Reply Last reply Reply Quote 2
                        • andrecool-68A
                          andrecool-68
                          last edited by

                          1 Reply Last reply Reply Quote 1
                          • Alan KilbornA
                            Alan Kilborn @Alan Kilborn
                            last edited by

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

                            Meta ChuhM 1 Reply Last reply Reply Quote 0
                            • PeterJonesP
                              PeterJones
                              last edited by

                              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
                              • Meta ChuhM
                                Meta Chuh moderator @Alan Kilborn
                                last edited by Meta Chuh

                                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
                                • Alan KilbornA
                                  Alan Kilborn
                                  last edited by

                                  Thanks for everyone’s efforts so far…

                                  1 Reply Last reply Reply Quote 2
                                  • Meta ChuhM
                                    Meta Chuh moderator
                                    last edited by

                                    @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
                                    • Ilkka LindblomI
                                      Ilkka Lindblom
                                      last edited by

                                      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.

                                      Meta ChuhM 1 Reply Last reply Reply Quote 3
                                      • Meta ChuhM
                                        Meta Chuh moderator @Ilkka Lindblom
                                        last edited by Meta Chuh

                                        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
                                        • Alan KilbornA
                                          Alan Kilborn
                                          last edited by Alan Kilborn

                                          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.

                                          Meta ChuhM 1 Reply Last reply Reply Quote 2
                                          • Meta ChuhM
                                            Meta Chuh moderator @Alan Kilborn
                                            last edited by

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

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