PDA

View Full Version : How to determine if app is installed?



nsg1975
08-12-2004, 11:52 AM
I have a simple InstallShield Express project that installs/uninstalls normally. I also have a simple win32 autorun program that needs to check whether the app is currently installed when it starts up. If the app is installed, I also need its install path (i.e. INSTALLDIR).

What is the accepted or most straightforward approach to accomplish this?

Thanks in advance!

TsungH
08-12-2004, 01:13 PM
There are more than one way to do it. One way is to have a registry key for your main executable under HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths. Another common approach is to look under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall.

nsg1975
08-13-2004, 01:14 PM
Thanks for the reply. Will the "Uninstall" reg key always be located under the HKEY_LOCAL_MACHINE path you specified?

i.e. Does it matter if they install the app "only for this user" or "for all users"?

Thanks!