简体   繁体   English

更改NSIS安装程序属性

[英]Changing NSIS installer properties

I have an NSIS-based installer file called setup.exe . 我有一个名为setup.exe的基于NSIS的安装程序文件。 When I go into Properties->Details, many details are missing. 当我进入Properties-> Details时,很多细节都缺失了。 When I run the installer, UAC requests for elevated permissions (which is ok), but the publisher is "Unknown". 当我运行安装程序时,UAC请求提升权限(这没关系),但发布者是“未知”。

How can I set these properties in the final setup.exe , preferably by only changing the NSIS installer script itself? 如何在最终的setup.exe中设置这些属性,最好只更改NSIS安装程序脚本本身?

For the properties, you need version info table: various VIAddVersionKey directives and VIProductVersion . 对于属性,您需要版本信息表:各种VIAddVersionKey指令和VIProductVersion As an example, here's a snippet from the PortableApps.com Launcher : 例如,这是PortableApps.com Launcher的一个片段:

Name "${NamePortable} (PortableApps.com Launcher)"
OutFile "${PACKAGE}\${AppID}.exe"
Icon "${PACKAGE}\App\AppInfo\appicon.ico"
Caption "${NamePortable} (PortableApps.com Launcher)"
VIProductVersion ${Version}
VIAddVersionKey ProductName "${NamePortable}"
VIAddVersionKey Comments "A build of the PortableApps.com Launcher for ${NamePortable}, allowing it to be run from a removable drive.  For additional details, visit PortableApps.com"
VIAddVersionKey CompanyName PortableApps.com
VIAddVersionKey LegalCopyright PortableApps.com
VIAddVersionKey FileDescription "${NamePortable} (PortableApps.com Launcher)"
VIAddVersionKey FileVersion ${Version}
VIAddVersionKey ProductVersion ${Version}
VIAddVersionKey InternalName "PortableApps.com Launcher"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${AppID}.exe"

As for the publisher field in the UAC prompt, that is different. 至于UAC提示中的发布者字段,则不同。 That's to do with signing. 这与签名有关。 You'll need a digital certificate first, which costs money, and then you can integrate it with !finalize . 您首先需要一个数字证书,这需要花钱,然后您可以将其与!finalize集成。

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

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