Reputation: 626
I tried to add a user-defined field to my setup created with NSIS. The documentation of 'VIAddVersionKey' states:
Adds a field in the Version Tab of the File Properties. This can either be a field provided by the system or a user defined field.
But adding a simple test element like this:
VIAddVersionKey "test" "test"
Does not add anything new to the installer attributes, even if compiling the setup does not yield any warnings related to this. It seems that only the predefined fields are actually visible.
Unfortunately, I could not find any example configuration in the shipped NSIS examples, nor was I successful finding anything on the internet. This is why I am wondering, if I am missing something here?
So, what do I have to do, to actually get a user-defined field in an NSIS installer?
Upvotes: 0
Views: 505
Reputation: 101736
NSIS works as advertised, the field is successfully added to the version information block. You did not mention which version of Windows you are using but you might not see the field if you are using an inferior version. Windows 95..2003 displays all fields on the version tab, Vista and later switched to the shell property system as its source and only displays a few standard fields on the details tab.
VIProductVersion 1.0.0.0
VIAddVersionKey "test" "test"
will give you the following result:
You can inspect the version block by installing a shell extension or use a PE resource editor like Resource Hacker.
Upvotes: 2