惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
宝玉的分享
宝玉的分享
爱范儿
爱范儿
Last Week in AI
Last Week in AI
U
Unit 42
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
Recent Commits to openclaw:main
Recent Commits to openclaw:main
雷峰网
雷峰网
T
The Exploit Database - CXSecurity.com
L
LangChain Blog
C
CERT Recently Published Vulnerability Notes
S
Schneier on Security
C
Cisco Blogs
MongoDB | Blog
MongoDB | Blog
G
GRAHAM CLULEY
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
L
LINUX DO - 最新话题
D
Docker
K
Kaspersky official blog
Security Latest
Security Latest
博客园 - 【当耐特】
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Hacker News
The Hacker News
P
Privacy International News Feed
Microsoft Security Blog
Microsoft Security Blog
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Martin Fowler
Martin Fowler
Latest news
Latest news
Project Zero
Project Zero
TaoSecurity Blog
TaoSecurity Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threat Research - Cisco Blogs
H
Heimdal Security Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Help Net Security
Help Net Security
A
Arctic Wolf
Cisco Talos Blog
Cisco Talos Blog
Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence

博客园 - 南国之恋

系统技术栈 解决delphi7在win10上安装后无法正常使用的问题 windows服务器C盘空间清理,发现大文件,可用!AutoCleanC_DeepScan 查看分区表大小 系统表空间清理 postman调用deepseek webapi 将Nginx安装为windows服务,下载nssm 单词系列2 2025高考英语高频易错词汇分类速记 vs2019 本地源“C:\Program Files\DevExpress 22.2\Components\System\Components\Packages”不存在 - 南国之恋 mysql数据库定时事件 plsql查询oracle数据表时,将备注显示成列名 生成脚本 达梦数据库学习记录 oracle密码过期问题,用户锁定问题 mysql odbc delphi连接问题 调用Exe程序并且出现界面 CreateProc(ProcessName:String) c# winform exe.config不能更新 frp(fast reverse proxy)是一款高性能的反向代理应用 GitHub上整理的一些工具 Kettle 中文名称叫水壶
Delphi 7 编译软件申请管理员权限
南国之恋 · 2024-11-28 · via 博客园 - 南国之恋

第一步,建立manifest文件,如xx.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" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>


请注意:uiAccess=''false' 是必须要的,如果没有会运行报错:


第二步, 用文本编辑器,新建一个文本文件,填写如下内容,并保存成xx.rc(xx.rc文件和上面的xx.manifest文件放在同一个文件夹下)

1 24 xx.manifest

第三步, 打开dos 命令行,cd到上面两个文件所在的目录,运行如下命令
brcc32 xx.rc -fo xx.res

第四步, 将生成的xx.res 复制到delphi的工程目录下,在程序里引用:

{$R xx.res}

编译。就可以看到应用程序图标自带小盾牌了。

(如果想调试阶段也能申请到管理员权限,用管理员权限运行delphi32.exe)
————————————————

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/awski/article/details/48052419