MartyConnelly
martyconnelly at shaw.ca
Sat Mar 8 01:30:00 CST 2003
Here is an interesting short method I came across, it assumes MSI
installer is on your
machine but if running Office XP or 2000 it should be. It will only
list products
installed by Windows MSI installer. Maybe someone will find this useful,
perhaps for remote client debugging.
Sub ProductListfromMSIinstall()
'Lists Products installed by Windows Installer
Dim oWInst As Object
'Dim msiInstaller As WindowsInstaller.Installer
Dim oProducts As Object
Dim product As Variant
Dim strName As String
Dim strMinVer As String
Dim strMaxVer As String
Dim strVer As String
Set oWInst = CreateObject("WindowsInstaller.Installer")
On Error Resume Next
Set oProducts = oWInst.Products
For Each product In oProducts
strName = oWInst.ProductInfo(product, "ProductName")
strMinVer = oWInst.ProductInfo(product, "VersionMinor")
strMaxVer = oWInst.ProductInfo(product, "VersionMajor")
strVer = oWInst.ProductInfo(product, "VersionString")
Debug.Print strName & " Version: " & strVer
Next
End Sub
This will return something like this that you can parse.
WMI SQL Server Provider Version: 1.0.0.0
WinHTTP 5.0 SDK Version: 5.0.2613.0
CodeSwap 2.0 Add-in for Visual Studio .NET Version: 2.0.0
Microsoft XML Parser and SDK Version: 4.10.9404.0
Microsoft Data Access 2.6 SDK Version: 2.6
Office XP Web Services Toolkit 2.0 Installation Files and Whitepapers
Version: 2.0
WebFldrs XP Version: 9.50.5318
Microsoft IntelliPoint 4.1 Version: 4.10.0851
Microsoft .NET Framework 1.1 Version: 1.1.4322
Microsoft SQL Server 2000 Books Online (Updated - SP3) Version: 8.2.0.0
Microsoft Application Compatibility Analyzer Version: 1.00.0000
McAfee VirusScan Version: 6.0.1
Microsoft SQL Server Desktop Engine Version: 8.00.194
WMI Tools Version: 1.50.1131.0001
Microsoft ASP.NET Web Matrix Version: 0.5.464.0
Microsoft Visio Professional 2002 [English] Version: 10.0.525
Microsoft Office XP Professional Version: 10.0.2627.01
Microsoft Office XP Web Components Version: 10.0.4406.0
Microsoft SOAP Toolkit 3.0 Version: 3.00.1325.3
Bluetooth Stack for Windows by Toshiba Version: 1.01.02
Microsoft SOAP Toolkit 3.0 Samples Version: 3.00.1325.2