From 6ca8519cc204912937676dc223384787dde6aab7 Mon Sep 17 00:00:00 2001 From: Wade Peacock Date: Thu, 20 May 2021 19:19:10 -0700 Subject: ohai/plugins/packages.rb - order change - impact chef16/17 Change order of collect_programs_from_registry_key move collection of Wos6432Node before HKEY_CURRENT_USER When located last, ohai packages does not report Wow6432 software Found when updating from Chef 15 to Chef 16 Signed-off-by: Wade Peacock --- lib/ohai/plugins/packages.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ohai/plugins/packages.rb b/lib/ohai/plugins/packages.rb index 33591792..e9e74909 100644 --- a/lib/ohai/plugins/packages.rb +++ b/lib/ohai/plugins/packages.rb @@ -134,9 +134,9 @@ Ohai.plugin(:Packages) do require "win32/registry" unless defined?(Win32::Registry) packages Mash.new collect_programs_from_registry_key(Win32::Registry::HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall') - collect_programs_from_registry_key(Win32::Registry::HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Uninstall') + # on 64 bit systems, 32 bit programs are stored here moved before HKEY_CURRENT_USER otherwise it is not collected (impacts both ohai 16 & 17) collect_programs_from_registry_key(Win32::Registry::HKEY_LOCAL_MACHINE, 'Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall') - # on 64 bit systems, 32 bit programs are stored here + collect_programs_from_registry_key(Win32::Registry::HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Uninstall') end collect_data(:aix) do -- cgit v1.2.1