Issue #11868 has been updated by Josh Cooper. Affected Puppet version set to 2.7.6
I think we'd be better off querying the Windows Installer Automation interface: <http://msdn.microsoft.com/en-us/library/windows/desktop/aa369432(v=VS.85).aspx>, especially since ruby provides decent ole/com support. 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 </pre> Generates: <pre> 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> And to uninstall a product given its productcode: <pre> # msiUILevelNone = 2 installer.UILevel = 2 # INSTALLSTATE_ABSENT = 2 installer.ConfigureProduct("{936c99c8-74c3-4ca3-9688-e39fe2237d4b}", 0, 2) </pre> ---------------------------------------- Bug #11868: msi package provider can only manage packages it installed https://projects.puppetlabs.com/issues/11868 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.
