如何在Windows 7中要求管理员权限? [英] How to ask for Administrator privileges in Windows 7?

查看:173
本文介绍了如何在Windows 7中要求管理员权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7下使用Qt编写了一个应用程序。应用程序以正常的用户权限启动,但是我想获得管理员权限,因为我想修改注册表以自动启动应用程序。

I wrote an application using Qt under Windows 7. The application starts up with normal user privileges, but I want to gain the Administrator privileges because I want to modify the registry to auto-start the application.

我如何做到这一点?

推荐答案

看看MSDN示例: UAC自我提升(CSUACSelfElevation)

另外,维基百科实际上有很好的参考资料,包括有关 ShellExecuteEx() runas 动词和海拔请求的应用程序清单。

Also, Wikipedia actually has a pretty good reference including information on the ShellExecuteEx() "runas" verb and application manifest for elevation requests.

这篇关于如何在Windows 7中要求管理员权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆