FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Dobbs M-Dev
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
March 01, 2001

Customizing Windows Installer

(Page 16 of 24)
Month Year/Article Title/Listing 5

Listing 5: 1stoff.vbs — Iterating through Installer collections

Option Explicit
Public installer, state, feature, product, component, fullmsg, num
Const msiInstallStateDefault      =  5

' Connect to Windows Installer object
set installer = Wscript.CreateObject("WindowsInstaller.Installer")


fullmsg = ""
for each product in installer.products
fullmsg = fullmsg & product & " " & installer.ProductInfo _
        (product, "InstalledProductName") & vbcrlf
next

msgbox fullmsg

state = installer.productstate _
    ("{00000409-78e1-11d2-b60f-006097c998e7}")

if state <> msiInstallStateDefault then 
   MsgBox ("Office not Installed " & state)
   Wscript.quit
end if
fullmsg = ""
for each feature in installer.features _
    ("{00000409-78e1-11d2-b60f-006097c998e7}")
   fullmsg = fullmsg & feature & " " & installer.FeatureState _
    ("{00000409-78e1-11d2-b60f-006097c998e7}", feature) & vbcrlf
next
msgbox fullmsg
Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK