• Login
Community
  • Login

Admin vs. non-Admin inconsistency?

Scheduled Pinned Locked Moved General Discussion
12 Posts 4 Posters 626 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 Apr 24, 2021, 12:28 PM

    Interesting?:

    Have an instance of Notepad++ running as administrator:

    2aa7d2f6-3eea-4b8e-b7c4-946f42793ba3-image.png

    Have a totally separate instance of N++ running as non-Administrator.

    Have an Explorer (non-admin) window open.

    Attempt to drag-and-drop a .txt file from Explorer to non-Admin N++.
    It works (obviously) to open the file into a N++ tab.

    Attempt to drag-and-drop a .txt file from Explorer to Admin-level N++.
    Nothing happens; file is not opened; no error message (ok, an error message would be nice, but I can deal with it the way it is).
    The possible lesson from this part of the story is that a non-admin app can’t share data to an admin app this way.

    Attempt to drag-and-drop a tab (for a file on disk) from non-Admin N++ to Admin-level N++.
    SUCCESS, it works to open the file in the Admin instance.
    This seems, well, a bit inconsistent, when compared to the Explorer test?

    P 1 Reply Last reply Apr 24, 2021, 5:48 PM Reply Quote 3
    • P
      PeterJones @Alan Kilborn
      last edited by Apr 24, 2021, 5:48 PM

      @Alan-Kilborn ,

      I just replicated the process, and agree with your results.

      Personally, I’ve never understood why Admin-mode would prevent drag-and-drop; it would be nice if they figured out how to allow that to work into an Admin window. But I’d suggest pointing to this thread as a workaround when people want to drag-and-drop into admin mode. :-)

      While running the experiment I noticed that it would close my non-admin window if it were the last (only) tab dragged out. I guess forcibly removing the last tab might be expected to close the app.

      A 1 Reply Last reply Apr 24, 2021, 6:56 PM Reply Quote 0
      • A
        Alan Kilborn @PeterJones
        last edited by Apr 24, 2021, 6:56 PM

        @PeterJones said in Admin vs. non-Admin inconsistency?:

        noticed that it would close my non-admin window if it were the last (only) tab dragged out.

        Well, one can always Ctrl+drag out a tab, to avoid that situation, if it is important to avoid it. But perhaps it is another inconsistency, as I’d think its (dragging tab out WITHOUT Ctrl) behavior would be governed by this setting:

        f8728bfa-9a68-4009-928c-9fa5a764575a-image.png

        But it doesn’t appear to be…

        1 Reply Last reply Reply Quote 0
        • G
          gstavi
          last edited by Apr 25, 2021, 7:41 AM

          Try dragging a file from explorer into an admin command prompt and normal command prompt.
          Same results.

          This is a Windows feature completely unrelated to Notepad++. Windows blocks the messages related to drag and drop since there are security risks involved.

          A 1 Reply Last reply Apr 25, 2021, 11:18 AM Reply Quote 0
          • A
            Alan Kilborn @gstavi
            last edited by Apr 25, 2021, 11:18 AM

            @gstavi said in Admin vs. non-Admin inconsistency?:

            Try dragging a file from explorer into an admin command prompt and normal command prompt.
            Same results.
            This is a Windows feature completely unrelated to Notepad++. Windows blocks the messages related to drag and drop since there are security risks involved.

            My complaint wasn’t with this, specifically.
            My intent was to just point out perhaps an inconsistency, and one that has potential value as a workaround to the Windows behavior.

            G 1 Reply Last reply Apr 25, 2021, 12:31 PM Reply Quote 0
            • G
              gstavi @Alan Kilborn
              last edited by Apr 25, 2021, 12:31 PM

              @Alan-Kilborn
              Please phrase the inconstancy that concerns you?

              I understood that the inconsistency was that drag-and-drop acts differently for normal user Notepad++ instance and admin Notepad++ instance?

              Since I used to drag from explorer to command prompt a lot, I specifically remember that it stopped working for Windows Vista since Microsoft decided that it is unsafe and blocked it.

              I guess that an Admin Notepad++ wouldn’t observe any Windows message when a file is dragged from explorer into it so it can not show any feedback to the user.

              I admit I am a bit surprised that drag and drop from normal Notepad++ to Admin Notepad++ does work. Don’t know why, but some ideas are:

              • Explorer.exe is critical part of Windows it is possible that stricter rules are applied for dragging from it.
              • Drag-and-drop is complex with lots of implementation details that may make the difference.
              1 Reply Last reply Reply Quote 1
              • M
                mere-human
                last edited by Apr 25, 2021, 7:34 PM

                This looks like a caution measure in Windows.

                As a security measure Windows does not permit drag and drop from an unelevated source to an elevated recipient.

                More info here:
                https://social.msdn.microsoft.com/Forums/en-US/5ff2938f-7eb0-4fec-9ce1-b4b745886797/drag-n-drop-not-working-on-elevated-mode-with-coledroptarget?forum=vcgeneral

                But probably it is worth to create an issue for this. Could you, please, do that, @Alan-Kilborn ?

                A G 2 Replies Last reply Apr 25, 2021, 8:42 PM Reply Quote 2
                • A
                  Alan Kilborn @mere-human
                  last edited by Apr 25, 2021, 8:42 PM

                  @mere-human said in Admin vs. non-Admin inconsistency?:

                  But probably it is worth to create an issue for this. Could you, please, do that, @Alan-Kilborn ?

                  I’m not sure, what issue I would make?

                  M 1 Reply Last reply Apr 25, 2021, 9:15 PM Reply Quote 0
                  • M
                    mere-human @Alan Kilborn
                    last edited by Apr 25, 2021, 9:15 PM

                    @Alan-Kilborn I mean report a bug in Notepad++ repository.

                    A 1 Reply Last reply Apr 25, 2021, 10:40 PM Reply Quote 0
                    • A
                      Alan Kilborn @mere-human
                      last edited by Apr 25, 2021, 10:40 PM

                      @mere-human

                      I realize that. :-)

                      But, maybe I see it as just an inconsistency, not a bug.
                      As said above, it can be a workaround for something that Windows/Explorer just won’t do.
                      As such, I don’t really want to put an issue in – it might get acted upon! :-)

                      P 1 Reply Last reply Apr 25, 2021, 10:49 PM Reply Quote 2
                      • P
                        PeterJones @Alan Kilborn
                        last edited by Apr 25, 2021, 10:49 PM

                        @Alan-Kilborn said in Admin vs. non-Admin inconsistency?:

                        I don’t really want to put an issue in – it might get acted upon!

                        Indeed. :-)

                        You might want to put in a bug report to the effect that “exit on close the last tab” setting is ignored when you drag the last active tab to another instance.

                        1 Reply Last reply Reply Quote 0
                        • G
                          gstavi @mere-human
                          last edited by Apr 26, 2021, 6:41 AM

                          Based on the link that @mere-human found, Admin Notepad++ may be able to get drag and drop messages by disabling filters with a call to ChangeWindowMessageFilterEx.

                          So there is point to file an issue.

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