Issue #11868 has been updated by Josh Cooper.
I trying using the Windows Installer Automation interface: <http://msdn.microsoft.com/en-us/library/windows/desktop/aa369432(v=VS.85).aspx>, which seemed promising. For example, to query for installed products: <pre> require 'win32ole' installer = WIN32OLE.new("WindowsInstaller.Installer") installer.Products.each do |guid| # http://msdn.microsoft.com/en-us/library/windows/desktop/aa370130(v=VS.85).aspx puts "#{installer.ProductInfo(guid, 'ProductName')} #{guid}" %w[Language PackageCode Transforms AssignmentType PackageName InstalledProductName VersionString RegCompany RegOwner ProductID ProductIcon InstallLocation InstallSource InstallDate Publisher LocalPackage HelpLink HelpTelephone URLInfoAbout URLUpdateInfo InstanceType].sort.each do |prop| puts " #{prop}=#{installer.ProductInfo(guid, prop)}" end puts end Generates: Splunk {936c99c8-74c3-4ca3-9688-e39fe2237d4b} AssignmentType=1 HelpLink=http://www.splunk.com/page/submit_issue HelpTelephone= InstallDate=20120110 InstallLocation=c:\splunk\ InstallSource=c:\packages\ InstalledProductName=Splunk InstanceType=0 Language=1033 LocalPackage=c:\WINDOWS\Installer\1399f6e.msi PackageCode={AF681FAA-772A-4AA8-8861-352609FFEF83} PackageName=splunk-4.2.4-110225-x64-release.msi ProductID=none ProductIcon=c:\WINDOWS\Installer\{936c99c8-74c3-4ca3-9688-e39fe2237d4b}\ARPPRODUCTICON.exe Publisher=Splunk, Inc. RegCompany= RegOwner=josh Transforms= URLInfoAbout=http://www.splunk.com URLUpdateInfo=http://www.splunk.com/download VersionString=108.2.13425 VMware Tools {FE2F6A2C-196E-4210-9C04-2B1BC21F07EF} AssignmentType=1 HelpLink= HelpTelephone= InstallDate=20110817 InstallLocation=C:\Program Files\VMware\VMware Tools\ InstallSource=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\000036e3\ InstalledProductName=VMware Tools InstanceType=0 Language=0 LocalPackage=C:\WINDOWS\Installer\1afa8.msi PackageCode={F4B7F59E-4135-4735-97A6-3A98E2AA3A55} PackageName=VMware Tools64.msi ProductID=none ProductIcon=C:\WINDOWS\Installer\{FE2F6A2C-196E-4210-9C04-2B1BC21F07EF}\ARPPRODUCTICON.exe Publisher=VMware, Inc. RegCompany= RegOwner=josh [email protected] URLInfoAbout=http://www.vmware.com URLUpdateInfo= VersionString=8.4.7.12773 </pre> Interestingly, it captures the transform(s) used to install the VMware Tools package, so I'm optimistic that Uninstall would work as expected. And you can programmatically uninstall products: <pre> I've also verified you can programmatically uninstall products. For example, this will uninstall splunk silently: # msiUILevelNone = 2 installer.UILevel = 2 # INSTALLSTATE_ABSENT = 2 installer.ConfigureProduct("{936c99c8-74c3-4ca3-9688-e39fe2237d4b}", 0, 2) </pre> And Lance confirmed that "uninstall does indeed work properly with our multi-instance MSIs." And he added, "Down the road, the ability to enumerate patches should be a bonus for rounding out your Windows support." But we later determined that the automation interface only describes packages installed via MSI, not self-extracting executables. So it's still not clear how the Add/Remove Program dialog is populated (seems to be from multiple sources) ---------------------------------------- Bug #11868: msi package provider can only manage packages it installed https://projects.puppetlabs.com/issues/11868#change-56257 Author: Josh Cooper Status: Accepted Priority: Normal Assignee: Josh Cooper Category: windows Target version: Affected Puppet version: 2.7.6 Keywords: Branch: The msi package provider keeps track of packages it installed in a yaml file. As a result, it doesn't know about packages it didn't install. The msi package provider should query the registry <http://msdn.microsoft.com/en-us/library/aa372105(VS.85).aspx>, or access that information through WMI's Win32_Product <http://msdn.microsoft.com/en-us/library/windows/desktop/aa394378(v=vs.85).aspx> This way it will accurately report on the state of the system. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
