Your whose()
filter is applying against the final result - which is just the InstallLocation string value, you’ve lost the reference to the registry key by then.
Put the filter earlier in the query -
Values "InstallLocation" of keys whose (value "DisplayName" of it...) of keys