21

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?

Eldad Mor
  • 5,405
  • 3
  • 34
  • 46

1 Answers1

39

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.

icc97
  • 11,395
  • 8
  • 76
  • 90
Chris Morgan
  • 86,207
  • 24
  • 208
  • 215
  • 1
    !finalize is for SVN builds only, you have to wait for 2.47 for that command. But there are some other threads on the NSIS forum about signing using !system – Anders Nov 22 '10 at 17:06
  • @Anders: ah, I just searched for "nsis sign" (knowing it can be done, our head guy signs our stuff) and found plenty about signing *uninstallers* but nothing much about installers. (Wiki page about signing uninstallers but nothing about signing installers? That should be rectified.) I didn't recognise `!finalise` but thought it might have been introduced in 2.46 and I forgot about it. Considering I had done a Vim syntax file for it and gone through the commands, I think I just didn't really think about it. – Chris Morgan Nov 22 '10 at 23:48