0

When I want to open a file in an application, I have the habit to do this by dragging the file from the Windows explorer, and dropping it inside the application (which I have already opened before). This works for lots of applications (Notepad, Notepad++, MS-Word, MS-Excel, ...), and MS-Word even has different behaviours (in case nothing is open, then open the file, else embed the file inside of the already opened file).

This however seems not to work for the mentioned applications when they are started as administrator, which I find quite annoying.

Is there a way to say to Windows that it must allow its applications to open files, even in the case they are drag- and dropped into the application?

0

This is a security feature called User Interface Privilege Isolation. It was added to windows after Vista.

It disallows applications to communicate via the UI from a lower elevation (e.g. Windows Explorer as a standard user) to higher a level elevation (Your application run as administrator). However it works the other way (Higher to Lower) and clipboard is shared regardless.

As far as I know, there is no real workaround for this.

0

To run Windows Explorer as Administrator by itself doe not work, but a similar effect can be achieved by opening another application as Administrator and using its File - Open or File - Save dialog for drag/drop. E.G.

  • Press Windows.
  • Type notepad.exe.
  • Press CtrlShiftEnter.
  • Click Yes in the UAC dialog.
  • In Notepad, press Ctrlo to use the File - Open dialog. Files can be dragged from this dialog to another application that is being run as Administrator.

Caveat: With privilege comes responsibility -- using Explorer as Administrator gives one the opportunity to delete system files or make other changes that could mess up a PC.

4
  • I expected this would be the answer, but when I tested it on W10/1709 with an elevated Notepad it didn't work. It turns out that the reason for this is that opening Explorer as Administrator doesn't run as expected: it opens a new thread in the existing Explorer, which runs with current privileges, so dragging and dropping still works only on the unelevated Notepad. – AFH Mar 30 '18 at 16:38
  • 1
    The only way round I have found is to use an alternative file manager - I used Explorer++ and this receives elevated privileges when requested, though I was surprised to find that the elevated Explorer++ could drag and drop to an unelevated Notepad as well. As a footnote, I used the Portable Apps version, rather than doing a new installation. – AFH Mar 30 '18 at 16:38
  • @AFH, thanks for pointing out my error... but I've altered the answer and tested it, this time, to achieve the same results. Admittedly, this is a bit of a kluge, requiring an additional application be kept open. Third-party explorer replacements such as Q-Dir, Free Commander and Explorer++ also work, as you point out. – DrMoishe Pippik Mar 30 '18 at 17:43
  • Good point about using an open dialogue: it avoids the necessity of a third-party application, which many people don't like or can't use because of policy settings. – AFH Mar 30 '18 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.