更改NSIS安装程序属性

问题描述 投票:18回答:1

我有一个名为setup.exe的基于NSIS的安装程序文件。当我进入Properties-> Details时,很多细节都缺失了。当我运行安装程序时,UAC请求提升权限(这没关系),但发布者是“未知”。

如何在最终的setup.exe中设置这些属性,最好只更改NSIS安装程序脚本本身?

nsis
1个回答
33
投票

对于属性,您需要版本信息表:各种VIAddVersionKey指令和VIProductVersion。举个例子,这里是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"

至于UAC提示中的发布者字段,则不同。这与签名有关。您首先需要数字证书,这需要花钱,然后您可以将它与!finalize集成。

© www.soinside.com 2019 - 2024. All rights reserved.