zoukankan      html  css  js  c++  java
  • Delphi Xe2 后的版本如何让Delphi程序启动自动“以管理员身份运行"

     由于Vista以后win中加入的UAC安全机制,采用Delphi开发的程序如果不右键点击“以管理员身份运行”,则会报错。

    在XE2以上的Delphi版本处理这个问题已经非常简单了。

    右建点击工程,选择“Options”->“Applicaion”下,将Runtime themes项设置为“Use Custom manifest”,点击下方按钮,选择相应的Manifest文件即可。

    需要注意的是:Debug和Release模式不同,要进行同样设置

    如图:

    至于Manifest文件,也就是一个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>

  • 相关阅读:
    利用@media screen实现网页布局的自适应
    js判断手机的左右滑动
    文档流
    对文本段落操作的一些细节
    简易菜单的制作
    jQuery Scroll Follow
    node 监听接口
    浏览器通知
    webSocket
    前端学习路线
  • 原文地址:https://www.cnblogs.com/zhenfei/p/4478713.html
Copyright © 2011-2022 走看看