Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UAC elevation does not allow drag and drop [duplicate]

I have a .net application where I need to elevate with admin rights due to accessing some low level win APIs. I am doing it using requestedExecutionLevel in application manifest set to requireAdministrator.

The application also needs to receive drag and drop requests from windows explorer. I have tried setting uiAccess to true in manifest and complying with other requirements like authenticode signing of the application, installing in restricated location (program files) etc. The appliction is running properly without any error (on vista, win 7) where user gets the UAC prompt for elevation.

But still not able to accept drag and drop requests.

like image 797
CDS Avatar asked Nov 23 '11 08:11

CDS


1 Answers

Lower-privileged processes cannot drag-and-drop to higher-privileged ones on Vista and later.

The bottom line is that drag and drop from Windows Explorer will not work if your application is elevated.

https://web.archive.org/web/20190118125513/https://blogs.msdn.microsoft.com/patricka/2010/01/28/q-why-doesnt-drag-and-drop-work-when-my-application-is-running-elevated-a-mandatory-integrity-control-and-uipi/

like image 176
Eric J. Avatar answered Oct 29 '22 10:10

Eric J.