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.

RE: Detecting if an application is installed on a system by FamilyTreeMike

FamilyTreeMike
Tue May 06 06:16:01 CDT 2008

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.

"Greg Smith" wrote:

> 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.
>
>
>

Re: Detecting if an application is installed on a system by Greg

Greg
Tue May 06 07:22:43 CDT 2008

Family Tree Mike wrote:
> 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?

Re: Detecting if an application is installed on a system by Cor

Cor
Tue May 06 10:12:21 CDT 2008


"
>
> 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


Re: Detecting if an application is installed on a system by FamilyTreeMike

FamilyTreeMike
Tue May 06 10:32:03 CDT 2008

"Greg Smith" wrote:

>
> 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;


Re: Detecting if an application is installed on a system by FamilyTreeMike

FamilyTreeMike
Tue May 06 10:45:02 CDT 2008

Sorry... Add checks for whether the keys exist of course!

"Family Tree Mike" wrote:

> "Greg Smith" wrote:
>
> >
> > 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;
>