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?
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.
Related
I am creating an application that has a different name depending on the user language. So for example the software is called "Device Emulator" in English and "Geräteemulation" in German.
I want to reflect the different names in the Version Info of the setup file (right click -> Properties -> "Details" tab).
So far I have found no way in Inno Setup to specify a localized "VersionInfo", neither in the online help nor on the net.
Originally I tried to use custom messages in the setup sections of which I learned I am not allowed to. See code below.
[Setup]
AppName={cm:ApplicationName}
AppVerName={cm:ApplicationName} V{#MYVERSION}
AppCopyright=© 2018 {#MYCOMPANY}
AppPublisher={#MYCOMPANY}
AppVersion={#MYVERSION}
AppId={cm:ApplicationName}{#MYVERSION}
VersionInfoVersion={#MYVERSION}
VersionInfoCompany={#MYCOMPANY}
VersionInfoCopyRight=(C) {#MYCOMPANY}
VersionInfoDescription={cm:ApplicationName}
VersionInfoProductName={cm:ApplicationName}
VersionInfoProductVersion={#MYVERSION}
I expected this to show me a property window with localized application name and version information but unfortunately it just displays {cm:ApplicationName} for AppName, VersionInfoProductName and VersionInfoDescription.
So, does any of you know how to localize this in Inno Setup?
All Inno Setup constants are evaluated on run/install-time. While version info is a compile-time thing (it's built into a header of the installer .exe file). So you cannot use constants in any of the VersionInfo* directives.
While technically, Windows .exe can include separate version info structures for different locales (languages), this is not supported by Inno Setup.
Inno Setup has only a single placeholder for the version info.
I am creating an application that has a different name depending on the user language. So for example the software is called "Device Emulator" in English and "Geräteemulation" in German.
I want to reflect the different names in the Version Info of the setup file (right click -> Properties -> "Details" tab).
So far I have found no way in Inno Setup to specify a localized "VersionInfo", neither in the online help nor on the net.
Originally I tried to use custom messages in the setup sections of which I learned I am not allowed to. See code below.
[Setup]
AppName={cm:ApplicationName}
AppVerName={cm:ApplicationName} V{#MYVERSION}
AppCopyright=© 2018 {#MYCOMPANY}
AppPublisher={#MYCOMPANY}
AppVersion={#MYVERSION}
AppId={cm:ApplicationName}{#MYVERSION}
VersionInfoVersion={#MYVERSION}
VersionInfoCompany={#MYCOMPANY}
VersionInfoCopyRight=(C) {#MYCOMPANY}
VersionInfoDescription={cm:ApplicationName}
VersionInfoProductName={cm:ApplicationName}
VersionInfoProductVersion={#MYVERSION}
I expected this to show me a property window with localized application name and version information but unfortunately it just displays {cm:ApplicationName} for AppName, VersionInfoProductName and VersionInfoDescription.
So, does any of you know how to localize this in Inno Setup?
All Inno Setup constants are evaluated on run/install-time. While version info is a compile-time thing (it's built into a header of the installer .exe file). So you cannot use constants in any of the VersionInfo* directives.
While technically, Windows .exe can include separate version info structures for different locales (languages), this is not supported by Inno Setup.
Inno Setup has only a single placeholder for the version info.
I'm creating a hotfix based on an installation file. When I run the hotfix, the first dialog box shows "Welcome to the hotfix for App version . Nothing in my hotfix project refers to this wrong number and I don't see a way to override the value it's putting there. The .msi file in the base image folder did have references to the wrong version number, but I changed them. The hotfix file is still showing the wrong version number. Any idea how I can override this or find where it's pulling this wrong version number from? Thanks!
Open Dialog editor in InstallShield (located under User Interface > Dialogs) and find InstallWelcome dialog. See what its text looks like; maybe there is some hardcoded version referred there. If there is no hardcoded version, see what property is being referred to in the text (e.g.[ProductVersion]), and make sure it's a correct property and it's set to the correct value.
I have an Installscript MSI project created in InstallShield. I want to be able to append the install directory to the Add/Remove Programs (Programs and Features) entry when my application is installed. This application can be installed on the workstation multiple times to different folder locations, so I want some way to visually separate them in Add/Remove Programs.
Right now, the Add/Remove Programs entry for my product looks like this:
My Application Name
I want it to look like this:
My Application Name - My Application Install Folder (replaced by [INSTALLDIR])
How do I do that?
I don't believe there's a supported way to do this based on the registry entry values and where they come from:
http://msdn.microsoft.com/en-us/library/aa372105(v=vs.85).aspx
that are used to show that data, and the fact that the MSI ProductName property is fixed text that I think you can't change after the install has started. You could test that of course by simply using some script or a custom action to set the ProductName property to [ProductName] plus [INSTALLDIR].
So you'd have to update that Registry item in the Uninstall registry data yourself. At the very end of the install when the entries are there modify them with custom action code by appending the INSTALLDIR value.
It's not something that people do with MSI setups and I wouldn't recommend it. The value will probably overflow the field length because ProductName is limited to 63 characters.
If the issue is that there may be several uninstall entries and you want to verify that the user is uninstalling the right one, you could probably add some dialog to show the actual version somehow if you save that install location somewhere. The ARPNOREMOVE property will prevent direct uninstall, then you can force a Modify dialog to do Change and then Uninstall with more detail. The general idea is here:
http://devdare.blogspot.com/2012/10/how-to-force-gui-uninstall-using.html
A typical "upgrade table" for InstallShield MSI installation cntains two records: "from any version to current is upgrade" and "from current to any is downgrade". This requires to manually copy-paste "current version" number every time a major, minor or build number has changed, that is not very good.
Currently i'm using a script that parses .ism project file and replace version number in upgrade table before build. But this is a dirty hack. Maybe it is possible to use "ProductVersion" MSI property in upgrade table, so product version is stored only in this property? I have tried to enter this property name multiple ways, like [ProductVersion] or ##ProductVersion##, but nothing helps - it is not being replaced by property value, and resulting MSI contains "##ProductVersion##" text instead of "1.30.1264" property value.
A new project should contain two records intended to behave like you describe. However instead of storing an actual product version, they should have a marker token, something like ***ALL_VERSIONS*** (sorry, I'm not near my copy of InstallShield right now). The name for this token isn't great, because what really happens is the current ProductVersion is substituted for it at build.
If you've already changed the token to an actual version, you can change it back with the "friendly" view by selecting a radio button referencing "my version" instead of the actual version. Or you can create a new project to see it, and copy it in. The token works in either the minimum or maximum field in all recent versions (but just in the maximum field in some older versions) of InstallShield.