温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

vs2005和vs2010 UAC提权

发布时间:2020-08-15 20:04:25 来源:网络 阅读:538 作者:xiesiyuana 栏目:开发技术


UAC是什么意思,看官方解释:

User Account Control (UAC) is a new security component in Windows Vista and newer operating systems. With UAC fully enabled, interactive administrators normally run with least user privileges. This article and the attached code samples demonstrate these frequently asked coding scenarios related to UAC.


简单来说就是给当前应用程序提供权限,进而可以对系统做一些需要特殊权限才能完成的操作,比如联网,写文件等。


在VS2010下UAC提权非常简单,只需要在编译器内工程属性设置即可,如下图:

vs2005和vs2010 UAC提权


但vs2005就没有这么简单了,但也是比较方便的,方法如下:

首先新建一个xml文件,输入以下下内容:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator"/> </requestedPrivileges> </security> </trustInfo> </assembly>

然后将这个文件拖拽到vs2005的工程目录下,通过菜单添加因为有file filter,似乎添加不了。

然后重命名下文件为 uac.manifest,重新编译即可



更多内容,请参考 www.seanyxie.com

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI