diff --git a/lib/metadata/util/win32/Win32Software.rb b/lib/metadata/util/win32/Win32Software.rb
index <HASH>..<HASH> 100644
--- a/lib/metadata/util/win32/Win32Software.rb
+++ b/lib/metadata/util/win32/Win32Software.rb
@@ -154,10 +154,27 @@ module MiqWin32
         hotfix = {}
         reg_node.each_element do |e|
           if e.attributes[:keyname][0, 8] == 'Package_'
-
+            # Expected pattern: Package_for_KBxxx_RTM~xxxx
+            
             # Get the hotfix id (KB #) out of the keyname
             package = e.attributes[:keyname].split("_")
-            hotfix_id = (package[2][0, 2] == 'KB') ? package[2] : package[3]
+            
+            # If the package identifier starts with KB, use this
+            # otherwise grab the ID from the end of the string (if it's long enough)
+            hotfix_id = nil
+            if (package[2][0, 2] == 'KB')
+              hotfix_id = package[2]
+            elsif package.size >= 4
+              hotfix_id = package[3]
+            else
+              # Unknown package ID pattern, print this out
+              str = ''
+              e.write(str)
+              $log.warn "Win32Software::initialize - Can't determine patch element's hotfix id: #{str}"
+            end
+            # don't add this package if the ID is nil
+            next if hotfix_id.nil?
+            
             hotfix_id = hotfix_id.split('~')[0]
 
             unless hotfix.key?(hotfix_id)
#<I> Fix for RollupFix within patch strings on windows VMs

(transferred from ManageIQ/manageiq-gems-pending@5f7ff<I>c<I>f8c<I>c0e<I>dfa6a)