Get application folder of application installed

  • Thread starter Alhambra Eidos Desarrollo
  • Start date
A

Alhambra Eidos Desarrollo

Hi anyone,



I have installed an Windows Forms Application (developed using VS 2005). My
application appears in Control Panel -> Add/Remove Programs. The path can be
default path or if the user changes will be another path.



now, I have another application .net and I want to get the application
folder (full path) of my Windows Forms Application. Only, I know the name of
my application (product name like it appears in Control panel -> Add/Remove
Programs)



Any suggestions, please? Sample code source very helpful





Thanks in advanced, greetings
 
C

Ciaran O''Donnell

You can write a particular registry key when you install the first program or
if that is done already, you can access the path from the registry key that
add/remove programs uses. If you know the application global id then it will
be the name of a subkey of
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
If you dont know that then you will need to look at the DisplayName item in
each of the subkeys in turn to find the one you are looking for, then you can
read the InstallLocation item which will have the install folder.
 
D

Duggi

You can write a particular registry key when you install the first program or
if that is done already, you can access the path from the registry key that
add/remove programs uses. If you know the application global id then it will
be the name of a subkey of
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
If you dont know that then you will need to look at the DisplayName item in
each of the subkeys in turn to find the one you are looking for, then youcan
read the InstallLocation item which will have the install folder.

This is the standard approach..

-Cnu
 

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