我有一个名为 setup.exe 的基于NSIS的安装程序文件。当我进入Properties-> Details时,缺少许多细节。当我运行安装程序时,UAC请求提升权限(这没关系),但发布者是“未知”。
如何在最终的 setup.exe 中设置这些属性,最好只更改NSIS安装程序脚本本身?
答案 0 :(得分: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
集成。