On Windows you do usual iterate over the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" registry, parse it to your needs and its done within a few seconds.
You do not get the executable name, you get the installation name of product.
key "DisplayName" = this is how a product calls itself
key "InstallLocation" = this is the root folder of installed product
ps: and "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" registry.... sorry forget to mention earlier.
above is used when product was installed via a setup.exe that add entries to my mentioned registry, lazarus/fpc does not use it, for that you really need to search in a long long long way all your drives for a matching executable name.