473,322 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Detecting if an application is installed on a system

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.
Jun 27 '08 #1
5 1108
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.
Jun 27 '08 #2
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?
Jun 27 '08 #3

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

Jun 27 '08 #4
"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;

Jun 27 '08 #5
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;

Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chad Smith | last post by:
Hi, I have created a .NET deployment project in Visual Studio 2003. I have specified an entry point into my own code in this installer which launches into the familiar: public override void...
10
by: sanket gupta | last post by:
Hi , When installing my application , i want to check whether the dot net runtime is available on the users computer and if its not , then i would like to provide him with a download location....
7
by: Aarti | last post by:
I have written a windows service that needs to perform certain functions only if a User is logged in. The problem I am running into is that I get an error if the computer is in the process of being...
1
by: Mark Rae | last post by:
Hi, I'm looking for a reliable way of detecting the version of Windows that the ..NET framework is installed on, specifically the service pack. Currently, I'm using System.Environment.OSVersion...
2
by: John J. Hughes II | last post by:
I have several application which may or may not be installed on a machine. I would like to call one application from another application if it's installed. Basically add a menu item the runs the...
0
by: javovo | last post by:
I have a C#.net Windows Forms application that throws an error (System.BadImageFormatException: An attempt was made to load a program with an incorrect format.) during random use if the user does...
0
by: June Li | last post by:
H I got a problem with detecting sound card with Windows xp I am working on an application to test microphone. First I need detect if there is a sound card installed (or integrated audio...
4
by: Jeff Stewart | last post by:
Right now, all my VB.NET programs crash on startup if the .NET Framework isn't installed on the target PC. Is there a graceful way to detect, notify-in-a-friendly-way, and quit of the application...
3
by: regtrashcan | last post by:
I have a webpage that detects whether Shockwave Player is installed and the version number. The javascript/vbscript that I use has worked fine until the latest release of the Shockwave Player. I am...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.