I\'ve created an MSI file with WiX. The source WiX file contains the version information like this:
For reference, here's a VBscript example that I'm using in my build process to grab such prior to creating a boostrapper.
Dim installer, database, view, result
Set installer = CreateObject("WindowsInstaller.Installer")
Set database = installer.OpenDatabase ("my.msi", 0)
Dim sumInfo : Set sumInfo = installer.SummaryInformation("my.msi", 0)
sPackageCode = sumInfo.Property(9) ' PID_REVNUMBER = 9, contains the package code.
WScript.Echo getproperty("ProductVersion")
WScript.Echo getproperty("ProductVersion")
WScript.Echo sPackageCode
WScript.Echo getproperty("ProductName")
Function getproperty(property)
Set view = database.OpenView ("SELECT Value FROM Property WHERE Property='" & property & "'")
view.Execute
Set result = view.Fetch
getproperty = result.StringData(1)
End Function