I found the error. When I extend your source with this:
case AInstallType of
it64bit: KeyAccess := KeyAccess + KEY_WOW64_64KEY;
it32bit: KeyAccess := KeyAccess + KEY_WOW64_32KEY;
end;
It does do like my Delphi app is doing, no WMI.
Cool! Silly mistake. Thanks for catching that.
Something is still not right though, with your modification I get 376 installed programs, on the other hand "Add remove programs" shows only 174.
Take a look at the following picture(attachment), those are not separate installations.
The whole install/uninstall process looks dubious to me. Anyways OP has enough information to work with.