UAC elevation does not allow drag and drop(UAC 提升不允许拖放)
问题描述
我有一个 .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 提升不允许拖放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:UAC 提升不允许拖放
基础教程推荐
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- MS Visual Studio .NET 的替代品 2022-01-01