/build/static/layout/Breadcrumb_cap_w.png

Does anyone know the best way to get public properties from an MSI install file?

I'm trying to deploy software throughout my company, but i need to know some of the public properties that go along with a few of the MSI files i have. 

What is the best way to find this?

0 Comments   [ + ] Show comments

Answers (4)

Posted by: vjaneczko 8 years ago
9th Degree Black Belt
2
You can create a verbose log file during the install. All properties are listed at the bottom of it.
Posted by: Pressanykey 8 years ago
Red Belt
1
Hi,
get hold of Orca, or if your a Dell customer RayPack For Dell KACE. You can then open the MSI file and examine the Properties in the Property table.

Cheers
Phil
Posted by: captain_planet 8 years ago
Black Belt
1
Since public properties don't contain lower case characters, you'd probably want something like this to automate it:

Const msiOpenDatabaseModeReadOnly = 0
Const msiOpenDatabaseModeTransact = 1

'create WindowsInstaller.Installer object
Dim oInstaller : Set oInstaller = CreateObject("WindowsInstaller.Installer")
 
'open the MSI (the first argument supplied to the vbscript)
Dim oDatabase : Set oDatabase = oInstaller.OpenDatabase(WScript.Arguments(0),msiOpenDatabaseModeReadOnly)
 
'create a view of the registry we want to see
Dim sql : sql = "SELECT `Property`,`Value` FROM `Property`"
Dim propView : Set propView = oDatabase.OpenView(sql)
 
'execute the query
propView.Execute
 
'fetch the first row of data (if there is one!)
Dim propRecord : Set propRecord = propView.Fetch
 
'whilst we've returned a row and therefore propRecord is not Nothing
While Not propRecord Is Nothing
 
    if (StrComp(propRecord.StringData(1),UCase(propRecord.StringData(1))) = 0) Then       
        wscript.echo "Property Name: " & propRecord.StringData(1) & vbCrlf & "Property Value: " & propRecord.StringData(2)
    End If

'go and fetch the next row of data
Set propRecord = propView.Fetch
Wend
 
propView.Close
Set propView = Nothing
Set propRecord = Nothing
Set oDatabase = Nothing
Set oInstaller = Nothing


(Script takes the MSI as the first argument). See here for more info on scripting with Windows Installer.  Also bear in mind that you may not want to omit some restricted properties and/or some standard public properties.

Comments:
  • Flippin' 'eck, Cap! Where have *you* been!?! - anonymous_9363 8 years ago
    • Long time no speak VBScab! Well - my absence has been down to a combination of things really! But mainly I shared your views here (http://www.itninja.com/question/whatever-happened-to-that-nice-mr-vbscab) to be honest! My value on these forums in recent years has diminished! These forums aren't what they used to be in the AppDeploy days! I mean, I couldn't even find a code tag for my post above (I guess you can't tell people off for that anymore, right?)! :-) - captain_planet 8 years ago
      • Well, to be honest, I'm only here to stave off boredom! The client I'm at is proving pedestrian at providing media so I don't have enough to do.
        >CODE tag
        You apply the 'Code' style using the drop-down at the top-left corner. I know it's not there for 'Replies' but should be for 'Answers'.... :-( - anonymous_9363 8 years ago
      • Nothing worse than a day with no media - long days indeed! Ahh i see! I tried to edit my post above but the submit button didn't.....submit! It doesn't appear as though I can reply to your most recent comment either. I think I need a user guide for this forum.... :-) - captain_planet 8 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ