Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find the ProductCode of one installed app.msi

9 views
Skip to first unread message

VP

unread,
Nov 19, 2009, 3:43:02 AM11/19/09
to
I developed one app.msi to intall one app. And I need to develop one
bootstraper.exe to retrieve the ProductCode of previously installed app
outside the MSI.

Some one suggested me to use MsiOpenDatabase/MsiViewExecute.

Could you please give me an example how to use it?

Sebastian Brand

unread,
Nov 19, 2009, 7:35:58 AM11/19/09
to
Here's some vbscript to show you how to use those objects:

Untested but'll you get the idea:

Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
Set database = installer.OpenDatabase("c:\path\toyour\msifile.msi", 0)
query = "SELECT 'Value' FROM Property WHERE Property='ProductCode'"
Set view = database.OpenView(query)
view.Execute
Set record = view.Fetch
WScript "ProductCode is " & record.StringData(1)


Best regards,
Sebastian Brand

Deployment consultant
E-Mail: seba...@instyler.com

Instyler Setup - Creating WiX-based MSI installations, elegantly.
http://www.instyler.com

0 new messages