Detecting if an application is installed on a system

G

Greg Smith

I have a series of applications that assume other applications are
installed. Is there a way to detect the installation of a specific
application?



Any help is greatly appreciated.
 
F

Family Tree Mike

There is no general rule to identifying whether a particular application is
installed. Some broadcast their availability by a registry key, others
don't. You may want to post the software title you are testing for and
someone may recognize a test that will identify the presence of it on the
system.
 
G

Greg Smith

Family said:
There is no general rule to identifying whether a particular application is
installed. Some broadcast their availability by a registry key,

These do. How would you identify the app?
 
C

Cor Ligthert[MVP]

"
These do. How would you identify the app?

By reading the registry with the proper rights, what is not always the
situation.

Your question is a little bit from 1980, now you have to be more precice in
what your searching and create proper security rigths to see that.


Cor
 
F

Family Tree Mike

Greg Smith said:
These do. How would you identify the app?

For example, the following code finds the current version of Java, and the
install path to it:

string key = @"SOFTWARE\JavaSoft\Java Runtime Environment";

Microsoft.Win32.RegistryKey keyJRE =
Microsoft.Win32 .Registry .LocalMachine .OpenSubKey (key, false);

string version = (string) keyJRE.GetValue("CurrentVersion");

Microsoft.Win32.RegistryKey keyJREactive = keyJRE.OpenSubKey(version);

string javahome =
System.IO.Path.Combine((string) keyJREactive.GetValue("JavaHome"),
@"bin\java.exe");

return javahome;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top