I have a product that is installed across many sites. Now we have released a Upgrade. But the issue was that in the first version the installation was per user and now we have made it per machine installation. There are custom actions in the new version (v3) that run when the old installation (v2) is detected. But it is not being detected as installed when the msi is run as a different user that installed version 2. Is there a way to detect if the Old version is installed (even if it was installed by a different user than the current user), probably in install script.
Check both registry 64/32 for installed applications. Look for your product GUID under those keys. If it's there, it's installed.
This works for MSI installed stuff.
32 Bit: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall]
64Bit: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall]