Change MSI or MST summary information using VBScript

Microsoft offers WiSumInf.vbs, which is provided in the Windows SDK Components for Windows Installer Developers. You can use this script like:

cscript WiSumInf.vbs [path to database][Property=value]

However, by looking at their example and learning about the WindowsInstaller.Installer object we can create a shorter and simpler one to use.

Set objArg = WScript.Arguments
MSI = "C:\Test\Test.MSI"

Set installer = Nothing
Set installer = CreateObject("WindowsInstaller.Installer")
Set suminfo = installer.SummaryInformation(MSI, 20)

'suminfo.Property(1) = "Test User MSI" 'ANSI codepage of text strings in summary information only
suminfo.Property(2) = "Test User MSI" 'Package Title
suminfo.Property(3) = "Test Subject" 'Package Subject
suminfo.Property(4) = "Alex" 'Package Author
suminfo.Property(5) = "" 'Package Keyword
suminfo.Property(6) = "Made with this Script" 'Package Comments
'suminfo.Property(7) = "Test User MSI" 'Package Template
'suminfo.Property(8) = "Alex" 'Package Last Author
'suminfo.Property(9) = "1" 'Package Revision
'suminfo.Property(11) = "Test User MSI" 'Printed: Date and time of installation image, same as Created if CD
'suminfo.Property(12) = "Test User MSI" 'Date of package creation
'suminfo.Property(13) = "Test User MSI" 'Date and time of last package modification
'suminfo.Property(19) = "Test User MSI" 'Security: 0=Read/write 1=Readonly recommended 2=Readonly enforced


As you can see, each field you want to customize in the summary information stream has a PID (Property ID). All of them are commented in the script above.

You can also visit the Manage Summary Information docs page on Microsoft to learn more.

The same script can also be used for MST, just change C:\Test\Test.MSI with C:\Test\Test.MST or whatever MST you desire.

Simple right?

Leave a comment

Your email address will not be published. Required fields are marked *

1 + 6 =