I am trying to automate some Standard Checks
Can anyone tell me how to read the Summary Information Stream of an MST using VBScript

Veena G
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Try this (Reads the 'title'):

'create installer object
Set oInstaller = CreateObject("WindowsInstaller.Installer")
'open msi in read-only mode
Set oDatabase = oInstaller.OpenDatabase(<PATH To MSI>, 0)
'apply transform
oDatabase.ApplyTransform <PATH TO MST>, 63
Dim streamobj
Set streamobj = oDatabase.SummaryInformation(0) '0 = read only
'read title
WScript.Echo streamobj.Property(2)
Set streamobj = Nothing
Set oDatabase = Nothing
Set oInstaller = Nothing
Answered 09/01/2008 by: captain_planet
Second Degree Brown Belt

Please log in to comment
0
I had been using the same code
But it does not read the summary table details as in MST
It gives the details of MSI - not MST
Answered 09/01/2008 by: veenarvg
Senior Yellow Belt

Please log in to comment
0
Hi Veena,
i don't think that this is possible.
Maybe it's possible to load the accompanying database, read the summary stream, load the MST and read the summary again.
If it changes, it's the transforms one...
Regards, Nick
Answered 09/01/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Hi Nick,
I am not aware of codes to load the MST and read the summary - as you specified
Is there any different code for reading the transform's summary?'
What does GenerateTransform and CreateTransformSummaryInfo actually do? Will this help?
Regards,
Veena G
Answered 09/01/2008 by: veenarvg
Senior Yellow Belt

Please log in to comment
0
Hi Veena,
still don't know exactly why you want to do this.
Are you aware, that there are transforms without the summary info stream?
please have a look at "WiSumInf.vbs", "WiLstXfm.vbs" + "WiGenXfm.vbs" from the installer SDK.
This should give you enough examples, to do it.
BTW: Captains example above should work, but is only an example. You need to customize it for your needs.
Regards, Nick
Answered 09/02/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
I got the solution.[:)]
Summary Information Stream can be directly accessed using the Installer object itself
Set oInstaller = CreateObject("WindowsInstaller.Installer")
Set streamobj = oInstaller.SummaryInformation(<Path to MSI or MST>)
'read title
msgbox streamobj.Property(2)
Set streamobj = Nothing
Set oInstaller = Nothing
See the following link for details about Installer.SummaryInformation
http://msdn.microsoft.com/en-us/library/aa369486(VS.85).aspx

Thanks,
Veena G
Answered 09/02/2008 by: veenarvg
Senior Yellow Belt

Please log in to comment
0
Hi Veena,
couldn't stand it. Did a test with "WiSumInf.vbs" from the SDK. Works perfect!
wscript or cscript WiSumInf.vbs <your MST>
Gives you all the attributes.

Regards, Nick
Answered 09/02/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity