问题描述
我有一个 .net 应用程序,由于访问了一些低级别的 win API,我需要提升管理员权限.我在设置为 requireAdministrator 的应用程序清单中使用 requestedExecutionLevel.
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.
应用程序还需要接收来自 Windows 资源管理器的拖放请求.我尝试在清单中将 uiAccess 设置为 true 并遵守其他要求,例如应用程序的身份验证签名、安装在受限位置(程序文件)等.应用程序运行正常,没有任何错误(在 vista,win 7 上),用户获取UAC 提示提升.
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.
推荐答案
在 Vista 及更高版本上,低权限进程无法拖放到高权限进程.
Lower-privileged processes cannot drag-and-drop to higher-privileged ones on Vista and later.
最重要的是,从 Windows 资源管理器中拖放不会如果您的应用程序被提升,则可以工作.
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-强制完整性控制和 uipi/
这篇关于UAC 提升不允许拖放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!