How can I find out if a program is installed, say Outlook or ACT?

What is the best way to find out if a particular program is installed on a machine, like ACT, Goldmine or Outlook?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

MerakConnect With a Mentor Commented:
There's really not an anwer to your question, as there are no standards in Winxx to keep track of programs installed in a system.

If you are looking for a 'well behaved' Winxx application, it should include an uninstaller, and it will create a registry entry under \HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Install.  I would look for (partial?) matches in the name of those keys.

Some programs do not include an uninstaller, but they might 'register' certain file extensions (in the Win.ini, under [Extensions]). Parse that section looking for the name of the executable if you don't know the extension(s), otherwise use the windows API FindExecutable.

Most 32bit programs typically register dlls as COM inproc servers, if you know the class id for the server, you could try to create an instance of the COM class, if you don't get an exception (Class not registered) you know it exists, you could also look for the class id under \HKEY_CLASSES_ROOT\CLSID.

Also, all programs that have been executed in a Win98 machine will leave a trail under the windows\Applog directory.  If the executable theprog.exe has been ran, there will be a file named theprog.lgc under that directory.

But short of scanning all local and mapped dirs for the actual exe there's really no fool proof way of telling.
Properly first check REGISTRY for it, and/or scan Drive for Files.

Just becuse it is in registry does not mean its installed anymore, some ppl just delete insted of Uninstall etc..
If the program you are looking for uses files with specific extentions you can use FindExecutable.

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

I would look through registry !!!


JazCAuthor Commented:
but, that's a lot to look through, and just searching for a text string isn't an effective way, as a lot of software will leave its garbage behind in the registry. However, is there a place in the registry that would be a good place to search, as in a place where programs has to be registered?

The idea was to be a quick and efficient way to search for multiple applications during an installation program, so I'd like it to be pretty much instant, so searching through the entire registry isn't going to cut it.

You know which apps you are looking for right?
Then you also know in which registry keys the app will exist. Those are the keys and values you look for when checking if an app is installed or not.

That is the way it is done in our installshield and upgrade apps.
In some instances for example when we check for Interbase the Registry keys can be different from version to version. This makes the whole process even more nasty. Also some additional checks can be done on critical parts of an installed application again in the case of interbase a check is done to find idapi.cfg

Sorry no easy way to do this because registry standards are only really being implemented now (and not by everyone)

best of luck
All Courses

From novice to tech pro — start learning today.