• Login
Community
  • Login

Still stuck in Administrator mode

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
18 Posts 9 Posters 2.6k 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
    Martin Olsson
    last edited by Martin Olsson Nov 2, 2023, 11:28 PM Nov 2, 2023, 11:17 PM

    Over the years, this issue has been reported over and over, in various versions of NP++ and various versions of Windows.

    Now it has hit me, and I’ve tried all solutions in all threads.
    None work. :-(

    I have even uninstalled NP++, including custom data.
    Then deleted the C:\Program Files\Notepad++\ dir.
    Then searched and deleted almost everything I could find in Regedit related to Notepad++.
    Rebooted the computer to make sure nothing old is cached.
    Installed the latest version of NP++ (v8.5.8) again, but this time I even changed the installation dir to C:\Program Files\Notepad++___2\ so no old references to the old Notepad++.exe could match.
    I then start Notepad++.exe (either directly from C:\Program Files\Notepad++___2\ or from the Desktop Icon that I let the installer create for me.
    In both cases, NP++ is starting in [Administrator] mode. :-( :-( :-(
    This is a fresh install. Never started before. I.e. no plugins or such.

    I have no “Run as Administrator” checked in the shortcut nor in the properties of the Notepad++.exe file itself (it is a brand new install into that ___2 directory).

    So something is still seriously wrong in NP++.

    My PC is a corporate Windows 11, where the UAC dialog has been replaced with some corporate software called “BeyondTrust Privilege Management”.
    Perhaps that has something to do with NP++ now being stuck in Admin mode? I have started many earlier versions of NP++ in Administrator mode. Then the BeyondTrust app appear (instead of the UAC), asking me why I need admin-privileges. This has to do with compliance and policys.
    Anyhow, the strange thing is that NP++ has always worked just fine, not constantly running in Admin-mode.
    The Windows machine is also fed a security policy from the corporate AD. Perhaps some security setting in there make NP++ behave badly?
    Two years ago I installed the plugin “Save as Admin”. In order to install this plugin I needed to start NP++ as Administrator.
    NP++ has always worked just fine, not constantly running in Admin-mode, so I don’t think this plugin has anything to do with it.

    NP++ was working just fine until 3 days ago.
    I didn’t update NP++.
    I didn’t update Windows 11.
    I didn’t start NP++ as Administrator.
    I didn’t open or try to save a file that need Admin privileges.

    Now it always opens up with [Administrator] in the title bar, and the app don’t work as expected.
    Very annoying.

    Since I’m not alone with this problem, and others too have tried all the “solutions” in the other threads (regedit, compatibility mode, rename the binary, …) I hope that you, the developers, would take a deep look into what is happening.

    I’m no developer myself but I’m experienced in Windows and Linux, and will gladly assist in any debugging if you can give me clear instructions. :-)

    A R P X J 5 Replies Last reply Nov 3, 2023, 12:31 AM Reply Quote 1
    • A
      Alan Kilborn @Martin Olsson
      last edited by Nov 3, 2023, 12:31 AM

      @Martin-Olsson said in Still stuck in Administrator mode:

      Over the years, this issue has been reported over and over, in various versions of NP++ and various versions of Windows.

      I was one of these reporters, at least here on the Community.

      My PC is a corporate Windows 11, where the UAC dialog has been replaced with some corporate software called “BeyondTrust Privilege Management”.
      Perhaps that has something to do with NP++ now being stuck in Admin mode?

      The PC I had where I was stuck in Administrator mode was also “corporate controlled”, so yes, probably all this “controlling” has something to do with it (I remember when computers were engineering tools; no longer; engineers are lucky they can even touch I.T.'s golden machines…but I digress).

      For me, it wasn’t just Notepad++ that would only run as admin; Visual Studio would as well.

      I drew the conclusion that it was somehow caused by I.T., and I just lived with it. One day it went away for Notepad++, but it remained until I left the job, for Visual Studio.

      Good luck to you.

      1 Reply Last reply Reply Quote 3
      • R
        rdipardo @Martin Olsson
        last edited by rdipardo Nov 3, 2023, 1:00 AM Nov 3, 2023, 12:56 AM

        Just a shot in the dark, but it’s possible the list of security principals was recently changed on the notepad++.exe image. If you peek at the Security tab of the file’s Properties dialog, you may see the principals have been limited to the “SYSTEM” and “Administrators” groups, e.g.

        npp-8.5.8-principals-admin-only.png

        Under that configuration, a non-admin user won’t even be able to execute the application, so the whole process takes on elevated privileges.

        Whatever the cause, sounds like I.T. is adopting a paranoid security posture, probably for a good reason…

        M 1 Reply Last reply Nov 3, 2023, 11:45 AM Reply Quote 2
        • P
          PeterJones @Martin Olsson
          last edited by Nov 3, 2023, 2:21 AM

          @Martin-Olsson said in Still stuck in Administrator mode:

          I hope that you, the developers, would take a deep look into what is happening.

          The readers of this Community forum are fellow users of Notepad++. Though a few of us have made contributions, we are not the core developer, nor is this the place for feature requests or bug reports.

          For some issues, we can help with workarounds or commisseration, but posting here will not get the developer working on it.

          A 1 Reply Last reply Nov 3, 2023, 12:03 PM Reply Quote 0
          • M
            Martin Olsson @rdipardo
            last edited by Nov 3, 2023, 11:45 AM

            @rdipardo
            Nope, the users and rights for the exe seem normal to me:
            d25bf744-0728-496c-bd07-961b8a5c836e-bild.png

            1 Reply Last reply Reply Quote 0
            • A
              Alan Kilborn @PeterJones
              last edited by Nov 3, 2023, 12:03 PM

              @PeterJones said in Still stuck in Administrator mode:

              …but posting here will not get the developer working on it.

              Also, even if it were a real bug report…to be worked on, it needs to be reproducible on demand, and that might be a dubious thing (but maybe @rdipardo 's setup would be a reasonable way to simulate?).

              1 Reply Last reply Reply Quote 1
              • X
                xomx
                last edited by Nov 3, 2023, 4:55 PM

                N++ devs cannot help you, it is caused by an invalid domain group policy (GPO) for sure.

                @Alan-Kilborn said in Still stuck in Administrator mode:

                it needs to be reproducible on demand

                If you are lucky and have a helpful and communicative domain admin, you can show him that there is a real problem. But your domain admin will have to temporarily reset back the GPO settings to its defaults and you will have to use the ‘gpupdate /force’ command. Then when it starts to behave normally again, you will have proof where the problem is …

                Or (if you have that power) remove your machine temporarily from the domain and do the resetting stuff yourself.

                If the above will not help, your Windows Security Accounts Manager (SAM) database is probably screwed up and the best thing to do is reinstalling your Windows OS.

                M 1 Reply Last reply Nov 3, 2023, 10:03 PM Reply Quote 2
                • X
                  xomx @Martin Olsson
                  last edited by Nov 3, 2023, 9:53 PM

                  @Martin-Olsson said in Still stuck in Administrator mode:

                  UAC dialog has been replaced with some corporate software called “BeyondTrust Privilege Management”.

                  Some relevant info:
                  https://www.beyondtrust.com/docs/privilege-management/windows/admin/index.htm

                  And maybe something to check:
                  %ProgramData%\Avecto\Privilege Guard\ePO Cache\Machine\PrivilegeGuardConfig.xml

                  (it is from here: https://www.beyondtrust.com/docs/privilege-management/windows/epo-admin/troubleshoot.htm )

                  There is one more thing to try (if you have local admin rights on your PC):

                  • temporarily unplug network cable from your PC (or disable your active network adapter), this is only to prevent your domain to interfere somehow
                  • try to disable that BeyondTrust SW somehow (look for the running services, try to kill some proceses, etc…, if it cannot be done, try to restart your Windows into SafeMode and continue)
                  • test your problem again, if the above helps, the BeyondTrust is the culprit
                  1 Reply Last reply Reply Quote 0
                  • M
                    Martin Olsson @xomx
                    last edited by Martin Olsson Nov 3, 2023, 10:30 PM Nov 3, 2023, 10:03 PM

                    @xomx
                    Thanks. Unfortunatley I have zero hope that the IT dept will make any changes.

                    But… Since my problem is that N++ is starting itself in Admin-mode (the “dangerous” mode), wouldn’t it be possible (and quite simple?) for the developers to add an option to force N++ to never enter Admin-mode.

                    Problem solved for people like me, whom don’t want N++ to be running in Admin mode.

                    There exist an option -noPlugin to Launch N++ without loading any plugin.
                    My suggestion would then be to add the new option -noAdmin.

                    -noAdmin :
                    Prevent Notepad++ from running in Administrator mode (do not elevate privileges). If launched from the Administrator account itself, there’s no ordinary user to fall back on, so Notepad++ will bail with a warning message.

                    CoisesC R X 3 Replies Last reply Nov 4, 2023, 12:55 AM Reply Quote 1
                    • CoisesC
                      Coises @Martin Olsson
                      last edited by Nov 4, 2023, 12:55 AM

                      @Martin-Olsson said in Still stuck in Administrator mode:

                      wouldn’t it be possible (and quite simple?) for the developers to add an option to force N++ to never enter Admin-mode.

                      I suspect it would not be possible. Windows (most likely at the behest of BeyondTrust) is launching in Admin mode. It’s already happened by the time Notepad++ gets control.

                      Have you tried any of the following:

                      1. Using a portable copy rather than an installed copy?

                      2. Installing somewhere other than Program Files?

                      3. Installing the 32-bit version?

                      I’m not saying any of those will necessarily work, but if they are possible under the controls imposed on your system, they might avoid whatever is triggering BeyondTrust to think it should elevate privileges.

                      1 Reply Last reply Reply Quote 0
                      • R
                        rdipardo @Martin Olsson
                        last edited by Nov 4, 2023, 12:58 AM

                        I would not be overly worried about the purported dangers of running N++ as admin. That BeyondTrust crapware probably logs every application start, so there’s not much you can do in “the dangerous mode” without detection — or which can’t be reversed with a system backup. Every current edition of Windows Defender supports controlled folder access anyway.

                        M 1 Reply Last reply Nov 4, 2023, 1:18 AM Reply Quote 2
                        • M
                          Martin Olsson @rdipardo
                          last edited by Nov 4, 2023, 1:18 AM

                          @rdipardo
                          The problem has less to do with security.
                          The problem is the annoying user experience.
                          When N++ is (unintentionally stuck) in Admin mode, lots of features are lost/restricted. :-( Like you can’t drag-n-drop files, remote editing is not allowed, the N++ window becomes an annoying sticky window in desktop managers, etc.

                          Oh well, I have now created a Feature request:
                          https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14310

                          1 Reply Last reply Reply Quote 1
                          • A
                            Alan Kilborn
                            last edited by Nov 4, 2023, 1:19 AM

                            For me it was more of an annoyance than a “danger”. Since my Explorer was running non-admin, I couldn’t drag and drop from there into Notepad++.

                            1 Reply Last reply Reply Quote 1
                            • X
                              xomx @Martin Olsson
                              last edited by Nov 4, 2023, 4:14 AM

                              @Martin-Olsson said in Still stuck in Administrator mode:

                              wouldn’t it be possible (and quite simple?) for the developers to add an option to force N++ to never enter Admin-mode.

                              Do not forget that your PC is not in a normal state. I mean - even if someone implements that “-noAdmin” feature (and the project maintainer accepts that), it is more than possible that it will not work on your machine!

                              Anyway, at normal circumstances such feature is doable, yes. You can withdraw the admin privileges from the already running app by the AdjustTokenPrivileges WINAPI. Or you can use the CreateRestrictedToken WINAPI and restart the app without that privilege. But, as I said, all of this could be impossible on your machine in its current state…

                              M 1 Reply Last reply Nov 4, 2023, 8:37 PM Reply Quote 3
                              • M
                                Martin Olsson @xomx
                                last edited by Nov 4, 2023, 8:37 PM

                                @xomx
                                I know.
                                I’m just hoping that someone will try to add the option.

                                If it works - great! Me and a lot of others now have a workaround for our “Stuck in admin” issue.
                                If it don’t work for me, but it works for PCs in normal state - then the work is not wasted. Paranoid people have an option to keep N++ from getting too high privileges.

                                1 Reply Last reply Reply Quote 0
                                • L
                                  LordKenmou
                                  last edited by Feb 28, 2024, 5:08 AM

                                  I have the same issue on a corporate Windows 10 managed by “BeyondTrust Privilege Management”, and I found an bit lazy solution.
                                  Somehow the npp starts as non-admin mode if I run npp as administrator from the right click context menu of notepad++exe or its shortcut. It does not work if you enable “run as administrator” checkbox on a property of notepad++exe or its shortcut.

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    JohnWren @Martin Olsson
                                    last edited by Sep 22, 2024, 8:15 PM

                                    @Martin-Olsson
                                    Hi!
                                    Suddenly I have had the same issue.
                                    Apparently was after made a cleaning with “Bleachbit”, I think was something in the Registry.
                                    Anyway, I have solved the issue by doing this:
                                    In Regedit
                                    Equipo\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
                                    EnableLUA
                                    Change 1 to 0

                                    Restart Windows

                                    And then in the Start Menu search for
                                    User Account Control Settings
                                    (or UAC)
                                    With the slider down just accept and Restart again.

                                    And that’s it!
                                    The [Administrator] in Notepad++ disappeared, and also others issues I had with other programs.
                                    I hope this helps.

                                    EkopalypseE 1 Reply Last reply Sep 23, 2024, 6:36 AM Reply Quote -1
                                    • EkopalypseE
                                      Ekopalypse @JohnWren
                                      last edited by Sep 23, 2024, 6:36 AM

                                      For future readers: The tip mentioned by @JohnWren disables the User Account Control feature.
                                      I strongly recommend NOT doing this, it has a purpose.
                                      That’s like removing the airbag from your car to save weight so you use less fuel?

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