Various HKEY_LOCAL_MACHINE\SOFTWARE subkeys contain the names and version numbers of the software installed on the local computer. (Information about the configuration of these applications is stored on a per-user basis under HKEY_CURRENT_USER.)
During installation, applications record this information in the following form:
HKEY_LOCAL_MACHINE\SOFTWARE\CompanyName\ProductName\Version