Every software (say Firefox) creates it's entry under the path
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
Firefox also creates it under the same path.
In my machine
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox5.0.1(x86 en-US)
is path for that.
Existance of this path confirms that firefox is installed on machine.
For the installation directory, read the value of key named 'InstallLocation' under above mentioned path for Firefox.