Hi Mark,
Thanks for posting.
To get a version of the MSI package, we can use the COM component
"WindowsInstaller.Installer". The following is an example in VBScript:
=================================================
'Create Installer object.
Dim Installer
Set Installer = CreateObject("WindowsInstaller.Installer")
'Open the MSI database. You may change the path information as you like.
Dim Database
Set Database = Installer.OpenDatabase("e:\setup3.msi", 0)
'Create the SQL statement for query
Dim SQL
SQL = "SELECT * FROM Property WHERE Property = 'ProductVersion'"
'Open the view and execute the SQL statement
Dim View
Set View = DataBase.OpenView(SQL)
View.Execute
'Fetch the record for the "ProductVersion" property
Dim Record
Set Record = View.Fetch
'Show the result.
MsgBox Record.StringData(2)
=================================================
For more information on automation interface on Windows Installer, you may
visit the link below:
http://msdn.microsoft.com/library/?url=/library/en-us/msi/setup/automation_i
nterface.asp?frame=true
As far as how to show the application version automatically, in fact the
application version is different from the Windows Installer package
version. Could you let me know what programming language you are using?
Regards,
Felix Wang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.