• 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.
  • A
    Alan Kilborn
    last edited by Jan 4, 2019, 4:21 PM

    On my computer, I am a lowly user:

    Imgur

    But whenever I run portable Notepad++ directly from its exe file (no shortcut involved) I end up in Administrator mode:

    Imgur

    How can I prevent this from happening?

    I seem to recall someone else having this problem recently, but I can’t find the postings ATM. And I don’t think there was a resolution in that thread anyway. But could be wrong in which case I’d appreciate being pointed there if anyone knows where it is.

    E 1 Reply Last reply Jan 4, 2019, 4:39 PM Reply Quote 1
    • E
      Eko palypse @Alan Kilborn
      last edited by Jan 4, 2019, 4:39 PM

      @Alan-Kilborn

      very strange, are you sure, that you don’t have another instance in admin mode running?
      Does this happen even after a reboot?

      A 1 Reply Last reply Jan 4, 2019, 5:47 PM Reply Quote 0
      • A
        Alan Kilborn @Eko palypse
        last edited by Jan 4, 2019, 5:47 PM

        @Eko-palypse said:

        are you sure, that you don’t have another instance in admin mode running?

        I am sure that this is not the case.

        Does this happen even after a reboot?

        Yes, it seems to be the standard way for N++ to run itself lately. I’m sure my I.T. dept did something “interesting” recently which now causes this to happen, but I’ve no idea what so that I can attempt countermeasures.

        M 1 Reply Last reply Jan 4, 2019, 7:02 PM Reply Quote 0
        • M
          Meta Chuh moderator @Alan Kilborn
          last edited by Jan 4, 2019, 7:02 PM

          @Alan-Kilborn

          what happens if you download and extract a fresh 7.6.2 (or a very old 6.x) portable zip to your desktop ? same ?
          does it do the same regardless if the portable release is x86 or x64 ?

          does it make a difference if you rename notepad++.exe to npp.exe and start it ?
          (if the cause is a policy filter by file name)

          and if you right click on both notepad++.exe’s and open properties > compatibility, is run as administrator checked and greyed out, or is it unchecked or checked ?
          (there’s also a button for a second compatibility settings page for all users, where you can check if runas administrator is activated)

          A 1 Reply Last reply Jan 4, 2019, 8:12 PM Reply Quote 0
          • A
            Alan Kilborn @Meta Chuh
            last edited by Jan 4, 2019, 8:12 PM

            @Meta-Chuh

            what happens if you download and extract a fresh 7.6.2 (or a very old 6.x) portable zip to your desktop ?
            does it do the same regardless if the portable release is x86 or x64 ?
            does it make a difference if you rename notepad++.exe to npp.exe and start it ? (if the cause is a policy filter by file name)

            I tried all of those situations. In all of those cases “[Administrator]” always shows in the title bar of N++.

            and if you right click on both notepad++.exe’s and open properties > compatibility, is run as administrator checked and greyed out, or is it unchecked or checked ?

            Run as Administrator is greyed out and unchecked

            (there’s also a button for a second compatibility settings page for all users, where you can check if runas administrator is activated)

            Yes but a popup comes up when I press this button saying my activity will be logged if I continue on…sheesh. I didn’t continue.

            Thx for the ideas @Meta-Chuh …

            1 Reply Last reply Reply Quote 0
            • P
              PeterJones
              last edited by Jan 4, 2019, 8:27 PM

              @Alan-Kilborn ,

              If you try running cmd.exe from double-clicking the executable, does it prefix the title bar with “Administrator:”? I am wondering IT left your machine in a state where everything is running as administrator. (I know I had mine running always-as-admin a few years back, but I have forgotten how I did it or undid it – maybe someplace in the UAC settings)

              A 1 Reply Last reply Jan 4, 2019, 8:54 PM Reply Quote 0
              • A
                Alan Kilborn @PeterJones
                last edited by Jan 4, 2019, 8:54 PM

                @PeterJones said:

                If you try running cmd.exe from double-clicking the executable, does it prefix the title bar with “Administrator:”?

                It does NOT.

                I am wondering IT left your machine in a state where everything is running as administrator

                If this were true it would actually ease my current problem…drag-and-drop (into Notepad++) failures. :)

                1 Reply Last reply Reply Quote 0
                • P
                  PeterJones
                  last edited by PeterJones Jan 4, 2019, 9:13 PM Jan 4, 2019, 9:12 PM

                  Have you checked your registry? this thread was trying to force it to open in Administrator mode, but if similar entries had the RUNASADMIN already, then maybe deleting those entries would work…

                  HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
                  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
                  

                  You might also check whether one of your entries like HKEY_CLASSES_ROOT\Applications\notepad++.exe or HKEY_CURRENT_USER\Software\Classes\Applications\notepad++.exe has a runas verb as well as (or instead of) an open verb.

                  Maybe start searching the registry for notepad++.exe and/or runas – it will find some irrelevant ones, but might find you what you are looking for…

                  M 1 Reply Last reply Jan 4, 2019, 9:35 PM Reply Quote 1
                  • M
                    Meta Chuh moderator @PeterJones
                    last edited by Jan 4, 2019, 9:35 PM

                    @Alan-Kilborn

                    @PeterJones 's good ideas regarding cmd and runas also made me think:
                    what would happen if you start a cmd window and execute runas /trustlevel:0x20000 "Your_Path_To\notepad++.exe" ?

                    does np++ still show [Administrator] in the title bar and in the debug info ?

                    1 Reply Last reply Reply Quote 1
                    • G
                      guy038
                      last edited by guy038 Jan 5, 2019, 1:33 PM Jan 5, 2019, 12:32 PM

                      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

                      A 1 Reply Last reply Jan 7, 2019, 1:33 PM Reply Quote 4
                      • A
                        Alan Kilborn
                        last edited by Jan 7, 2019, 1:23 PM

                        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
                        • A
                          Alan Kilborn @guy038
                          last edited by Jan 7, 2019, 1:33 PM

                          @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
                          • A
                            Alan Kilborn
                            last edited by Jan 7, 2019, 3:11 PM

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

                            M 1 Reply Last reply Jan 7, 2019, 6:03 PM Reply Quote 2
                            • A
                              andrecool-68
                              last edited by Jan 7, 2019, 5:39 PM

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

                              M 1 Reply Last reply Jan 7, 2019, 6:15 PM Reply Quote 0
                              • M
                                Meta Chuh moderator @Alan Kilborn
                                last edited by Meta Chuh Jan 7, 2019, 6:05 PM Jan 7, 2019, 6:03 PM

                                @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
                                • 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
                                          9 out of 35
                                          • First post
                                            9/35
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors