Community
    • Login

    Stuck in [Administrator] mode

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    20 Posts 6 Posters 4.2k 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.
    • Alan KilbornA
      Alan Kilborn @PeterJones
      last edited by

      @PeterJones said in Stuck in [Administrator] mode:

      …reboot, and then finally re-install Notepad++

      I’m curious if a portable version would do the same thing regarding admin mode; maybe worth trying before resorting to the larger action of a reinstall?

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

        @Alan-Kilborn said in Stuck in [Administrator] mode:

        @PeterJones said in Stuck in [Administrator] mode:

        …reboot, and then finally re-install Notepad++

        I’m curious if a portable version would do the same thing regarding admin mode; maybe worth trying before resorting to the larger action of a reinstall?

        It started with the portable version, as described in my very first post.

        1 Reply Last reply Reply Quote 0
        • AlA
          Al @PeterJones
          last edited by

          @PeterJones said in Stuck in [Administrator] mode:

          @Al ,

          Unfortunately, it’s a Windows setting, somewhere, that is likely causing that, and as Notepad++ experts, we aren’t necessarily full Windows superuser/experts as well.

          Well, okay, a couple more ideas:

          What Plugins do you have installed (? menu, Debug Info, copy from the dialog and paste here) – maybe some plugin interrupts the load and forces Admin mode, or something. Or maybe something interrupted a plugin installation, and Notepad++ got stuck in the “I will run myself with Admin next time so that I can actually do the installation”

          Or maybe uninstall Notepad++, remove everything from the registry and %AppData% about Notepad++, reboot, and then finally re-install Notepad++.

          I’ll try your last suggestion.
          As said in the first post: it did happen after upgrading the portable version BUT after installing the xml plugins that failed because of the VPN connection (everything is in the first post).

          Here the info about plugins:
          Notepad++ v7.9.1 (64-bit)
          Build time : Nov 2 2020 - 01:07:46
          Path : C:\Program Files\Notepad++\notepad++.exe
          Admin mode : ON
          Local Conf mode : OFF
          OS Name : Windows 10 Enterprise (64-bit)
          OS Version : 1809
          OS Build : 17763.1518
          Current ANSI codepage : 1252
          Plugins : mimeTools.dll NppConverter.dll NppExport.dll NppXmlTreeviewPlugin.dll XMLTools.dll

          1 Reply Last reply Reply Quote 0
          • AlA
            Al
            last edited by

            So…got nothing out of it, tried uninstalling, deleting all the reg entries manually and all the related files in %AppData% but no success.
            It’s in a strange “state”, even the installer of all the versions I tried automatically starts in Admin Mode.
            The installers .exe have the UAC shield but no prompt for credentials popup, when I run it a reg key is written under HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatability Assistant\Store with the name of the executable.
            Actually the real key for me is HKU\<my user sid>\...

            I was not able to find any way to escape this situation, very strange and very sad to have it locked in Admin Mode forever now :(

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

              @Al said in Stuck in [Administrator] mode:

              I was not able to find any way to escape this situation, very strange and very sad to have it locked in Admin Mode forever now

              That was how I felt when it happened to me.
              Not being able to drag and drop a file from Explorer was SOOO painful.
              I’m sorry to hear about your situation.
              It really would be nice to know how some users get into this situation.

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

                @Alan-Kilborn said in Stuck in [Administrator] mode:

                It really would be nice to know how some users get into this situation.

                And even nicer to be able to figure out how to reliably get out of the situation.

                It might be worth asking on superuser.com – there are more Windows experts available there than there are here, and maybe one of them will be able to help you through the problem. Just don’t be surprised when they ask you to repeat experiments that we or others have already asked. (Also, make sure you link your question to https://superuser.com/questions/547810/how-to-turn-off-always-run-as-administrator-windows-8-10, and say that you tried the suggestions there but they didn’t work.) If you do ask a question there, feel free to drop a link to that question here, so that we can follow that (and to make it easier to point to similar situations in the future.)

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

                  It really would be nice to know how some users get into this situation.

                  @PeterJones said in Stuck in [Administrator] mode:

                  And even nicer to be able to figure out how to reliably get out of the situation.

                  Well, yes, of course.
                  It seems that if a root cause for getting in could be determined, it would also point to a way of getting out, but perhaps not.

                  BTW, even though my problems for my daily use of Notepad++ regarding stuck-in-admin somehow resolved themselves so that I am no longer stuck, there are still weird, related things happening on my (I.T.-controlled) PC:

                  When I build and run the Notepad++ source code (just for fun) I note that the exe that is run from this (under the Visual Studio debugger) is in admin mode:

                  88caa225-d934-47d4-9cb5-e47741c4b7d9-image.png

                  This is because somehow, for me, Visual Studio is running in admin mode and thus its child process (N++) inherits this. I have been “around the block” looking for ways to NOT run VS as admin, to no avail (much like the OP).

                  BTW, if I run the generated N++ exe but not under debugger control, I get non-admin mode:

                  aae3ab63-040b-47a5-bec8-e874ee62e758-image.png

                  It appears to not be specific to Visual Studio version, because I also have a day-job need to run an older VS, and it always runs as admin as well:

                  caac4b45-e174-48a5-887e-d1c48a6ec071-image.png

                  I think I did post about this before in this Community, but since we’re “freshening” the conversation…
                  But, I’m not going too far with it, as the main “trouble” I’m having now is no longer Notepad++ related.

                  1 Reply Last reply Reply Quote 1
                  • AlA
                    Al
                    last edited by

                    @Alan-Kilborn
                    That’s a new one for me, I also develop in Visual Studio (2019 Professional) but have to run it as an Admin on purpose (e.g.: when I need to query AD with a fleet user, fleet user as Admin rights though).
                    Never ever had this happen to VS, till now of course…you never know :D

                    1 Reply Last reply Reply Quote 1
                    • AlA
                      Al
                      last edited by Al

                      I made some progress.
                      If I rename the “notepad++.exe” to something else (e.d.: “_notepad++.exe” or “notepad++_test.exe”) it runs normally.
                      Even renaming the installer now prompts the UAC.

                      Unfortunately I can’t find any list of executable anywhere in the registry, somewhere there is something that instruct windows to just run it as an admin.
                      While verifying the AppCompatFlags I noticed that both “_notepad++.exe” and “notepad++_test.exe” are in there and the binary data is different from “notepad++.exe”: tried modifying the latter to be equal to the other two but no success.

                      1 Reply Last reply Reply Quote 0
                      • AlA
                        Al
                        last edited by

                        Asked on Super User here: https://superuser.com/questions/1605488/notepad-stuck-in-administrator-mode-no-solution-but-found-a-clue

                        I 1 Reply Last reply Reply Quote 1
                        • Robin SteedR
                          Robin Steed
                          last edited by

                          This does not resolve the issue. The application runs as administrator regardless of whether this option is selected for the shortcut or the executable itself.

                          1 Reply Last reply Reply Quote 0
                          • I
                            irahsu @Al
                            last edited by

                            After trying the solution on the superuser discussion linked above, I found a solution to this problem:

                            1. Right-click on the notepad++.exe file, select Properties.
                            2. Click on the Compatibility tab, and select “Run this program in compatibility mode for:” and select “Windows 8”.
                            3. Make sure “Run this program as an administrator” is unchecked.
                            4. Click OK.

                            However, this work-around was not working when I tried to run Notepad++ via an AutoHotKey shortcut; it still ran as Administrator. So here is another work-around using Windows Task Scheduler:

                            1. Open the Windows Start menu, search for “task scheduler”, and run that.
                            2. Click on the “Task Scheduler Library” item in the tree view on the left.
                            3. Click on the Action menu, then “Create Task…”. Type in a name for your task.
                            4. Under the General tab, click the “Change User or Group…” button.
                            5. Type in “Users” in the “Enter the object name to select” box and click OK.
                            6. Click on the Actions tab, then click on the “New…” button.
                            7. Click on the “Browse…” button, and find your notepad++.exe file and open that.
                            8. Click on the Settings tab and make sure “Allow task to be run on demand” is checked.
                            9. Click OK.
                            10. To make a batch file to run this scheduled task, you can put this command in a text file and name it with a “.bat” extension:
                            schtasks /run /tn *<name of your task from step 3 here>*
                            
                            1 Reply Last reply Reply Quote 2
                            • First post
                              Last post
                            The Community of users of the Notepad++ text editor.
                            Powered by NodeBB | Contributors