如何添加清单 <requestedPrivileges>进入delphi项目的信息 [英] How to add manifest <requestedPrivileges> info into delphi project

查看:21
本文介绍了如何添加清单 <requestedPrivileges>进入delphi项目的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

清单信息添加到 Delphi XE 项目 (.exe) 的最简单方法是什么?

What is the easiest way to add the <requestedPrivileges> manifest info to a Delphi XE project (.exe)?

是否可以只添加所需的节点,例如:

Is it possible to add just the required node like:

<requestedPrivileges>   
  <requestedExecutionLevel level="requireAdministrator"/> 
</requestedPrivileges>

还是我必须添加整个清单文件,比如?

or do i have to add the whole manifest file, like?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="VistaLogonCustomizer.exe" type="*"/>
  <description>elevate execution level</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
   <security>
     <requestedPrivileges>
      <requestedExecutionLevel level="requireAdministrator"/>
     </requestedPrivileges>
   </security>
  </trustInfo>
  <dependency>
   <dependentAssembly>
     <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
   </dependentAssembly>
  </dependency>
</assembly> 

如果我必须添加整个清单文件,那么我是否与清单文件中的构建冲突(当项目选项激活运行时主题"设置为 true 时生成)?

If I have to add the whole manifest file, do I have then a conflict with the build in manfest file (which is generated when the project-option "Activate Runtime-Theme" is set to true)?

推荐答案

是否可以只添加所需的节点

Is it possible to add just the required node

绝对没有.清单是一个 XML 文档,并且 XML 文档必须是格式良好的.这是 XML 架构描述:

Absolutely NO. Manifest is an XML document and XML documents must be well-formed. Here is XML schema description:

http://msdn.microsoft.com/en-us/library/aa374191(VS.85).aspx

注意必需的元素和属性.

Note the required elements and attributes.

这篇关于如何添加清单 &lt;requestedPrivileges&gt;进入delphi项目的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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