首页 > 其他 > 详细

vs2005和vs2010 UAC提权

时间:2014-03-12 00:22:31      阅读:1503      评论:0      收藏:0      [点我收藏+]


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提权非常简单,只需要在编译器内工程属性设置即可,如下图:

bubuko.com,布布扣


但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

vs2005和vs2010 UAC提权,布布扣,bubuko.com

vs2005和vs2010 UAC提权

原文:http://blog.csdn.net/seanyxie/article/details/21033999

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!