Issue #11868 has been updated by Josh Cooper.

When I asked Lance "Do you know if WMI's Win32_Product class provides 
information that is not available in the Uninstall registry key, 
<http://msdn.microsoft.com/en-us/library/aa372105(VS.85).aspx>, for each 
installed application?" he replied:

"The answer here gets a little messy, so bear with me. My assumption, perhaps 
false, was that the WMI product provider would be a suitable abstraction over 
the underlying registry. I really don't want to go spelunking around the 
registry if I can avoid it, especially given the multiple locations available 
that can contain installed product information. For example, the key you cite 
is only one of a handful that can contain this information - don't forget the 
user-specific (HKEY_USER) variant and 32-bit applications installed on 64-bit 
machines - these go under the Wow6432Node "special" location.

Oh, and be aware that that "special" WOW64 location gets mapped differently 
based on the version of Windows you're on. Details here: 
<http://msdn.microsoft.com/en-us/library/aa384253(v=vs.85).aspx>

What I just realized today is that this affects what products are visible via 
WMI. On 64-bit Windows, it won't list 32-bit products. Lovely. Case in point, 
try installing WANdisco Subversion on 64-bit Windows 2008 (or Windows 7, I 
believe). It'll show up in Programs and Features, but not WMI. Btw, a quick way 
to see the WMI list is to issue the following command from the command line - 
"wmic product get name". You can, supposedly, force WMI to use 32-bit, but, of 
course, I haven't tried. That's just going off the deep end, IMHO. WMI 32-bit 
on 64-bit platform details here: 
<http://msdn.microsoft.com/en-us/library/aa393067(v=vs.85).aspx>

Another link: 
<http://stackoverflow.com/questions/673233/wmi-installed-query-different-from-add-remove-programs-list>

What I really want is the ability to hook into whatever logic populates the 
Programs and Features list in Windows and its respective uninstall 
functionality. If you find it, please let me know. I hate reinventing wheels.

So, yes, the original attraction behind WMI was getting a representative list 
and being able to call Uninstall, if need be, without crawling through registry 
entries or knowing the underlying details.
If all of the above sounds ridiculous, good, it should. I knew nothing of such 
details a couple of months back, having successfully avoided Windows servers 
(and operations) until a good friend needed help :) Of course, that also means 
you should take my comments with a grain of salt."
----------------------------------------
Bug #11868: msi package provider can only manage packages it installed
https://projects.puppetlabs.com/issues/11868#change-56255

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.

Reply via email to