Community
    • Login

    Notepad++ doesn't come to foreground

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    foregroundadministrator
    7 Posts 3 Posters 4.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.
    • Daniel SchielzethD
      Daniel Schielzeth
      last edited by

      Notepad++ usually comes into the foreground when I open a file (I am using Windows). However, if at some point I switch to the Administrator mode of the already open Notepad++ because I need to edit a file that demands extended rights, after that Notepad++ does not come into the foreground when I open a file.

      That’s a bug, isn’t it?

      Eko palypseE 1 Reply Last reply Reply Quote 1
      • Eko palypseE
        Eko palypse @Daniel Schielzeth
        last edited by

        @Daniel-Schielzeth

        That’s a bug, isn’t it?

        might be, but as I’m using npp in admin mode from time to time as well and haven’t discovered this behavior
        might I ask you to explain in detail what you are doing in order to be able to see if it can be reproduced?

        1 Reply Last reply Reply Quote 2
        • Daniel SchielzethD
          Daniel Schielzeth
          last edited by

          Okay, here we go:

          • Open npp
          • minimize it
          • open file explorer, klick on a file in the Programs-Folder: “Edit with npp”
          • npp opens the file in the foreground, perfect :-)
          • edit the file and save it
          • npp asks to restart in Admin-Mode, do it
          • save the file
          • minimize npp
          • open another file from file explorer (“Edit with npp”), you can use the same
          • npp opens the file but does not maximize / come to foreground
          Meta ChuhM 1 Reply Last reply Reply Quote 1
          • Eko palypseE
            Eko palypse
            last edited by Eko palypse

            Ok - I see but it seems that the ordering of minimizing npp is important.
            If I first minimize the admin mode npp and afterwards the normal npp then I see the same as you
            but if I first minimize the normal npp and afterwards the admin mode npp then a new edit…
            will open the normal npp.

            1 Reply Last reply Reply Quote 0
            • Meta ChuhM
              Meta Chuh moderator @Daniel Schielzeth
              last edited by Meta Chuh

              welcome to the notepad++ community, @Daniel-Schielzeth

              this is by uac design, to isolate elevation levels.
              your explorer is running, using your current user environment.
              while it is able to pass pipes to a running elevated process, it is not able to control the gui, as it is completely isolated, except to user input (mouse/keyboard).

              one thing you can do is to disable uac as shown at the screenshot below:

              note: another restriction of having uac enabled, is that you can’t drag and drop files from your user account to an elevated notepad++ or any other windowed elevated task, this is also by windows’ design

              the behaviour you see is completely normal with uac enabled (eg: open notepad++ elevated, minimise it, open explorer and right click on a file and select open with notepad++)

              1 Reply Last reply Reply Quote 4
              • Daniel SchielzethD
                Daniel Schielzeth
                last edited by Daniel Schielzeth

                @Meta-Chuh

                Thanks :-)

                I only get this behavior

                “the behaviour you see is completely normal with uac enabled (eg: open notepad++ elevated, minimise it, open explorer and right click on a file and select open with notepad++)”

                in Admin mode though, right? In the normal mode it works just fine. I don’t think I want to disable my uac for that ;-)

                Meta ChuhM 1 Reply Last reply Reply Quote 3
                • Meta ChuhM
                  Meta Chuh moderator @Daniel Schielzeth
                  last edited by

                  @Daniel-Schielzeth

                  yes, in normal mode it works fine, as long as your explorer and notepad++ share the same user level.

                  if you can live with this situation (a minimised, elevated application will not pop up on explorer context menu or other commands, unless triggered by any h.i.d. like a mouse click, and you can’t drag and drop from an explorer window to eg. an elevated notepad++), you can leave uac enabled.

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