/build/static/layout/Breadcrumb_cap_w.png

How to use MSI properties in VBscript?

Could you tell me how we can use the properties of msi in VBscript.


0 Comments   [ + ] Show comments

Answers (4)

Posted by: bkelly 10 years ago
Red Belt
2

I just posted a VBScript that displays all properties from an MSI file at http://www.itninja.com/blog/view/reading-an-msi-setup-with-vbscript

Posted by: jaybee96 10 years ago
Red Belt
0

Example of usage:

 

Function TestScript()

 

ListBoxProperty  = Session.Property("LISTBOXPROPERTY")

VersionNT        = Session.Property("VersionNT")

Version9x        = Session.Property("Version9X")

Password         = Session.Property("PASSWORD")

NotePad          = Session.Property("NOTEPADEXE")

 

MsgBox ("List Box:  " & ListBoxProperty & vbCrlf _

& "VersionNT: " & VersionNT & vbCrlf _

& "Version9X: " & Version9x & vbCrlf _

& "Password:  " & Password & vbCrlf _

& "Notepad:   " & NotePad) 

 

Session.Property("LISTBOXPROPERTY") = "GOODBYE"

 

End Function

Comments:
  • It looks like the session object is declared outside this function making this a bit incomplete as reference ;) - bkelly 10 years ago
Posted by: Gary 10 years ago
Blue Belt
0

you can use properties by adding it to command line during creating a vbscript.


Comments:
  • Hi Gary, Assume msi is already built. And based on some property values in msi, I would like to perform some task using vbscript. In this scenario how i can proceed. - rvprasad 10 years ago
Posted by: anonymous_9363 10 years ago
Red Belt
0

Get the Platform SDK. In there (admittedly buried pretty deep) will be the Windows Installer SDK. In there, you'll find sample scripts for handling MSIs.

The tables, including the Property table, can be queried using standard SQL syntax.

 
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