Archive: Version Information


Version Information
I am trying to grab the value of a user defined field from the Version tab in File Properties. From searching, I have found VIAddVersionKey, which does the exact opposite of what I want. Instead of setting these keys, is there any way to read them? I know there is a plug-in for this (MoreInfo), but I am not allowed to use plug-ins, so I was hoping to do it within base NSIS. Thanks


The only native NSIS instruction is GetDllVersion and it only grabs the version number.

You could call VerQueryValue and friends with the system plugin but that is a lot of work just to avoid a 3rd party plugin...


First time using a plug-in, I've downloaded and extracted the MoreInfo.zip, have moved MoreInfo.dll into C:\Program Files\NSIS\plugins, but don't see any .nsh files to move into C:\Program Files\NSIS\Include. Am I missing something, or maybe my extract didn't work correctly?

Also, is there a specific !include line I need to include in my .nsi file? Thanks :winamp:


Not every plugin has a .nsh, the wiki or included readme should have examples...


Here's what I have right now that's not working:

MoreInfo::GetUserDefined "$INSTDIR\BEP.exe" "BuildLabel"
Pop $0
MessageBox MB_OK $0

MoreInfo.dll has been moved to plugin folder, no !includes up top, from what I've read what I have should output "3.2.0.1" in my messagebox, but a blank string is being displayed. Any thoughts? In all the threads containing "MoreInfo" everyone seems to get it working right away, too frustrating! :igor:

Have gone through examples, my paths are correct, BuildLabel is correct,....


Originally posted by Ctc1989
I know there is a plug-in for this (MoreInfo), but I am not allowed to use plug-ins, so I was hoping to do it within base NSIS.
No plug-ins at all? Or no plug-ins that that don't ship with the "official" NSIS installer?

In the former case will probably notice that your installer already is using plug-ins, because many (basic) things in NSIS need plug-ins. Especially if you use MUI or MUI2, you installer definitely does use plug-ins. And that's not a bad thing, it's simply how things work.

In the second case, why not use plug-in that does exactly what you need? Trying to emulate the same thing with the System plug-in of NSIS is much more difficult and more error prone! I'd rather trust a third-party plug-in than reinvent the wheel.

Anyway, if using third-party plug-ins isn't possible for whatever reason, writing your own plug-ins for NSIS isn't rocked science. If you already have a basic knowledge about C/C++ and you know how to use Visual Studio, you can probably implement it yourself in one hour. What you'd need is GerFileVersionInfo plus VerQueryValue and that's it.