简体   繁体   English

将管理员/UAC 图标/符号添加到 Inno Setup 安装程序图标

[英]Add Administrator/UAC icon/sign to Inno Setup installer icon

I installed an application that only extracted the files without being really installed to the system so I created my own setup.exe.我安装了一个应用程序,它只提取文件而没有真正安装到系统中,所以我创建了自己的 setup.exe。 Now I wonder why there is no Admin sign in front of the.exe.现在我想知道为什么.exe前面没有Admin标志。 This is what i get:这就是我得到的:

在此处输入图像描述
and this is what normally a Setup installer looks like:这是安装程序安装程序通常的样子:

在此处输入图像描述

I can't find the needed code on the Inno Setup website.我在Inno Setup网站上找不到所需的代码。 I hope you can help me out what code I would have to add.我希望你能帮我找出我必须添加的代码。 (Yes I know I could just make another icon just for the setup but just adding some code would be much nicer. InstallForge does it automatically but Inno Setup just has better options for registry entries) Best Regards, Christian (是的,我知道我可以只为设置制作另一个图标,但只需添加一些代码会更好。InstallForge 会自动完成,但 Inno Setup 对注册表项有更好的选择)最好的问候,Christian

Windows looks at the application manifest to determine if the executable requires UAC elevation. Windows 查看应用程序清单以确定可执行文件是否需要 UAC 提升。

Set the requestedExecutionLevel node in the manifest to requireAdministrator .将清单中的requestedExecutionLevel节点设置为requireAdministrator

In Inno Setup you can set PrivilegesRequired to admin but that is already the default and it will not add the shield to current versions of Inno as far as I know.在 Inno Setup 中,您可以将PrivilegesRequired设置为admin但这已经是默认设置,据我所知,它不会将屏蔽添加到当前版本的 Inno。

If your installer is not signed you could perhaps use Resource Hacker to add/edit the manifest yourself.如果您的安装程序未签名,您也许可以使用 Resource Hacker 自己添加/编辑清单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM