cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

How to display version in MSI properties?

When you right-click an MSI file and then click properties, certain information is displayed on the summary tab. I would like to display the version number from the "product properties" in InstallShield. Does anyone know how to accomplish this?

I made some guesses in the "product information stream" but for example entering {ProductVersion} displays just that. It is apparently not a variable.
Labels (1)
0 Kudos
(10) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The Windows Installer (MSI) Summary Information Stream doesn't appear to have any fields relevant to the version of your product. You may be able to use a field that you can set (say the Description field) for this purpose. Otherwise, this is a feature request for Explorer and/or Microsoft in general.
0 Kudos
Not applicable

MichaelU wrote:
The Windows Installer (MSI) Summary Information Stream doesn't appear to have any fields relevant to the version of your product. You may be able to use a field that you can set (say the Description field) for this purpose. Otherwise, this is a feature request for Explorer and/or Microsoft in general.


I'm not sure that we are understanding each other. I'm not asking for an additional field. The version can be displayed in any of the existing fields: title, subject, comments, etc. I could manually enter the version in there but there must be a variable I can enter so that InstallShield automatically enters version information. Yes?
0 Kudos
J_anitha
Level 8

Refer help for MsiSummaryInfoSetProperty().
This function can set property for MSI file.
0 Kudos

The InstallShield Install Script Reference Guide gives no details on the parameters to this MsiSummaryInfoSetProperty() function.  An example script function would be most helpful showing how to add [ProductVersion] to the Comments field.

 

0 Kudos

You can add some info also in the InstallShield Editor:

InstallShieldMsiInfo.png

regards

Markus

0 Kudos

Original Poster Wrote: "I'm not sure that we are understanding each other. I'm not asking for an additional field. The version can be displayed in any of the existing fields: title, subject, comments, etc. I could manually enter the version in there but there must be a variable I can enter so that InstallShield automatically enters version information. Yes?"

As the original poster already outlined, he knows how to enter the text manually but we need to have the version entered automatically like with the property variable [ProductVersion]  but as he showed InstallShield does not do variable substitution on these fields.  So it was suggested to use the call MsiSummaryInfoSetProperty to set the property fields using a script which should have access go the [ProductVersion] variable.  However there is no documentation on the parameters for the function MsiSummaryInfoSetProperty describing how to use it to set for example the Comment field.

 

0 Kudos

Okay,

but you can not execute an InstallScript function in a msi package to alter the summary information.

What you can do is create a vbscript, .Net or C/C++ program that runs after the msi file was created, read the version info with the automation interface and modify the msi file with MsiSummaryInfoSetProperty or SummaryInfo object.

An example from a vbscript, which does something similar:

Dim objInstaller As Object
Set objInstaller = CreateObject("WindowsInstaller.Installer")

If Not objInstaller Is Nothing Then

Dim objNewDatabase As Object
Set objNewDatabase = objInstaller.OpenDatabase(szLocNewInstPackage, 0)

If Not objNewDatabase Is Nothing Then

Dim objSummary As Object
Set objSummary = objNewDatabase.SummaryInformation(3)

objSummary.Property(11) = Now
objSummary.Property(13) = Now
objSummary.Persist

objNewDatabase.Commit

End If

End If

Just theory, you have to try/test/modify

regards

Markus

0 Kudos

MarkusLatz you're right.   My logic was flawed.  Of course you can't modify the properties of the installer by executing the installer itself.  But if I do it as you suggest, modifying the MSI file after it's built by InstallShield then I fear the changed properties are going to invalidate the signing that InstallShield did at end of the build.  Perhaps it could be resigned following the modification to properties but this is getting way more complicated than it should be.   InstallShield should add property substitution to these fields in their next release

0 Kudos

To re-sign a msi file after build in a Postbuild Event is not complicated.

But yes it is easier if this is a feature in InstallShield.

regards

Markus

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Properties are read by the Windows Installer from the Properties table during the runtime of the installer. This isn't an action that can be performed when Installshield builds the project.

When installshield builds your project it reads the information from the ISString table to populate the Summary Information Stream values - as this is a build action any properties wouldn't be able to be validated here.

0 Kudos