The best method I have found for checking to see if the software is already installed regardless of version is to test if a key exists in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths for the application in question.
For example to deploy firefox 28.0 only to computers with a version already installed:
On the already installed test, I would create this rule:
Rule type: Registry Key Exists
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 28.0 (x86 en-US)
and for the Installable test I would create these 2 rules:
Rule type: Registry Key Exists
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
&
Rule type: Registry Key Exists
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 28.0 (x86 en-US)
& select the Reverse Rule option so it doesn't try to install to clients that already have it installed
For example to deploy firefox 28.0 only to computers with a version already installed:
On the already installed test, I would create this rule:
Rule type: Registry Key Exists
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 28.0 (x86 en-US)
and for the Installable test I would create these 2 rules:
Rule type: Registry Key Exists
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
&
Rule type: Registry Key Exists
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 28.0 (x86 en-US)
& select the Reverse Rule option so it doesn't try to install to clients that already have it installed