Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing NSIS installer properties

Tags:

I have an NSIS-based installer file called setup.exe. When I go into Properties->Details, many details are missing. When I run the installer, UAC requests for elevated permissions (which is ok), but the publisher is "Unknown".

How can I set these properties in the final setup.exe, preferably by only changing the NSIS installer script itself?

like image 289
Eldad Mor Avatar asked Nov 22 '10 10:11

Eldad Mor


People also ask

How to compile NSIS script?

To compile you can right-click your . nsi file and select Compile NSIS Script. This will cause MakeNSISW, the NSIS Compiler Interface, to launch and call MakeNSIS to compile your script.

Is NSIS open source?

NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.


1 Answers

For the properties, you need version info table: various VIAddVersionKey directives and VIProductVersion. As an example, here's a snippet from the 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. That's to do with signing. You'll need a digital certificate first, which costs money, and then you can integrate it with !finalize.

like image 160
Chris Morgan Avatar answered Sep 21 '22 16:09

Chris Morgan