查看完整版本: [--
实现和VS2010编译后同样的盾牌效果
--]
QTCN开发网
->
Qt QML开发
->
实现和VS2010编译后同样的盾牌效果
[打印本页]
登录
->
注册
->
回复主题
->
发表主题
zamxqun
2014-05-04 15:59
实现和VS2010编译后同样的盾牌效果
用VS2010开发程序时,只要在.vcxproj的<Link>标签中添加一行:<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
那么编译出的程序,在win7系统下,就会在图标上多了一个小盾牌的标志。现在想用QtCreator编译程序,实现同样的效果,朋友们知道怎么做么?具体的步骤是什么?
ashe0817
2014-05-05 09:30
http://blog.csdn.net/aqtata/article/details/17222691
zamxqun
2014-05-05 12:04
ashe0817
:
http://blog.csdn.net/aqtata/article/details/17222691
我改了E:\Qt\Qt5.2.1\5.2.1\msvc2010\mkspecs\win32-msvc2010\qmake.conf,但是编译后还是没有盾牌,运行报错[attachment=12020]
seanyxie
2014-08-05 11:45
vs UAC提权操作
http://www.seanyxie.com/vs2005%E4%B8%8B%E7%A8%8B%E5%BA%8Fuac%E6%8F%90%E6%9D%83/
seanyxie
2014-08-05 11:46
也可以直接在代码里提权
junan
2014-08-07 17:39
1、编辑App.rc文件,增加下列内容
1 24 "YouApp.exe.manifest"
2、编辑manifest文件内容,与VS相同
<?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>
3、修改pro文件增加下列内容
win32:
RC_FILE = App.rc
4、rebuild即可
809097747
2016-11-10 15:00
你好,我用的是qt + win32-vs2005 静态编译。这种方法试过了,不能用。后来我是这样试的,修改qmake.conf文件(QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"\"/MANIFESTUAC:level=\'requireAdministrator\' uiAccess=\'false\'\"),然后再添加uac.manifest的文件到资源文件(.rc)中。uac.manifest文件内容如下:
复制代码
<?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>
编译之后生成的exe文件点击打开会自动弹出“用户账户控制”窗口。但编译的时候会报告错误,但不影响生成exe。编译出错提示:release\DMX126_V10.intermediate.manifest : general error c1010070: Failed to load and parse the manifest.
我查了下,老外说什么manifest的文件名过长,导致加载不了这文件,请问怎么破?怎么去设置呢?
查看完整版本: [--
实现和VS2010编译后同样的盾牌效果
--] [--
top
--]
Powered by
phpwind
v8.7
Code ©2003-2011
phpwind
Gzip disabled