473,236 Members | 1,728 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,236 software developers and data experts.

Accessing Registry

I was wondering how I can programmatically find out the path of an installed
program. I have an application that needs access to a config file that
resides in the folder of another application. I'm guessing that this can be
done by accessing the registry, but some articles or sample code would be
useful.

Thanks.
Aug 17 '05 #1
9 1868
Unfortunately this is only going to be the case if the application you are
interested in makes an entry in the Registry, and not all applications do
(especially .NET apps)

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I was wondering how I can programmatically find out the path of an installed
program. I have an application that needs access to a config file that
resides in the folder of another application. I'm guessing that this can be
done by accessing the registry, but some articles or sample code would be
useful.

Thanks.

Aug 17 '05 #2
I guess now my question is how to make the entry for install directory into
the registry? I can add a key "InstallDir" for my .NET installation, but is
there any property that I can add for the "Value" filed so that the path can
evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
there is anythign like that in .NET.

Thanks.

"billr" wrote:
Unfortunately this is only going to be the case if the application you are
interested in makes an entry in the Registry, and not all applications do
(especially .NET apps)

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I was wondering how I can programmatically find out the path of an installed
program. I have an application that needs access to a config file that
resides in the folder of another application. I'm guessing that this can be
done by accessing the registry, but some articles or sample code would be
useful.

Thanks.

Aug 18 '05 #3
Yes, my friend, there most definately is.

Use the .Net setup project to create your msi, and whilst in design view,
you can add entries to the system registry

open the solution explorer window, and along the top you will see a bunch of
icons you should be able to easily recognise the registry icon :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I guess now my question is how to make the entry for install directory into
the registry? I can add a key "InstallDir" for my .NET installation, but is
there any property that I can add for the "Value" filed so that the path can
evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
there is anythign like that in .NET.

Thanks.

"billr" wrote:
Unfortunately this is only going to be the case if the application you are
interested in makes an entry in the Registry, and not all applications do
(especially .NET apps)

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I was wondering how I can programmatically find out the path of an installed
program. I have an application that needs access to a config file that
resides in the folder of another application. I'm guessing that this can be
done by accessing the registry, but some articles or sample code would be
useful.

Thanks.

Aug 18 '05 #4
Thanks, I found it. How do I specify the variable to determine the path of
the application directory?

"billr" wrote:
Yes, my friend, there most definately is.

Use the .Net setup project to create your msi, and whilst in design view,
you can add entries to the system registry

open the solution explorer window, and along the top you will see a bunch of
icons you should be able to easily recognise the registry icon :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I guess now my question is how to make the entry for install directory into
the registry? I can add a key "InstallDir" for my .NET installation, but is
there any property that I can add for the "Value" filed so that the path can
evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
there is anythign like that in .NET.

Thanks.

"billr" wrote:
Unfortunately this is only going to be the case if the application you are
interested in makes an entry in the Registry, and not all applications do
(especially .NET apps)

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:

> I was wondering how I can programmatically find out the path of an installed
> program. I have an application that needs access to a config file that
> resides in the folder of another application. I'm guessing that this can be
> done by accessing the registry, but some articles or sample code would be
> useful.
>
> Thanks.

Aug 18 '05 #5
I don't know if there is any standard for this, so my advice would be create
a key with a meaningful name.
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
Thanks, I found it. How do I specify the variable to determine the path of
the application directory?

"billr" wrote:
Yes, my friend, there most definately is.

Use the .Net setup project to create your msi, and whilst in design view,
you can add entries to the system registry

open the solution explorer window, and along the top you will see a bunch of
icons you should be able to easily recognise the registry icon :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I guess now my question is how to make the entry for install directory into
the registry? I can add a key "InstallDir" for my .NET installation, but is
there any property that I can add for the "Value" filed so that the path can
evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
there is anythign like that in .NET.

Thanks.

"billr" wrote:

> Unfortunately this is only going to be the case if the application you are
> interested in makes an entry in the Registry, and not all applications do
> (especially .NET apps)
>
> --
> Of all words of tongue and pen, the saddest are: "It might have been"
>
> Bill.Richards @ greyskin .co .uk
> http://greyskin.co.uk
>
>
> "Swami" wrote:
>
> > I was wondering how I can programmatically find out the path of an installed
> > program. I have an application that needs access to a config file that
> > resides in the folder of another application. I'm guessing that this can be
> > done by accessing the registry, but some articles or sample code would be
> > useful.
> >
> > Thanks.

Aug 18 '05 #6
I can create the key with a meaningful name--but what do I specify for its
"value" so that the application directory path would be evaluated and stored
in the registry for that key?

Thanks.
"billr" wrote:
I don't know if there is any standard for this, so my advice would be create
a key with a meaningful name.
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
Thanks, I found it. How do I specify the variable to determine the path of
the application directory?

"billr" wrote:
Yes, my friend, there most definately is.

Use the .Net setup project to create your msi, and whilst in design view,
you can add entries to the system registry

open the solution explorer window, and along the top you will see a bunch of
icons you should be able to easily recognise the registry icon :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:

> I guess now my question is how to make the entry for install directory into
> the registry? I can add a key "InstallDir" for my .NET installation, but is
> there any property that I can add for the "Value" filed so that the path can
> evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
> there is anythign like that in .NET.
>
> Thanks.
>
>
>
> "billr" wrote:
>
> > Unfortunately this is only going to be the case if the application you are
> > interested in makes an entry in the Registry, and not all applications do
> > (especially .NET apps)
> >
> > --
> > Of all words of tongue and pen, the saddest are: "It might have been"
> >
> > Bill.Richards @ greyskin .co .uk
> > http://greyskin.co.uk
> >
> >
> > "Swami" wrote:
> >
> > > I was wondering how I can programmatically find out the path of an installed
> > > program. I have an application that needs access to a config file that
> > > resides in the folder of another application. I'm guessing that this can be
> > > done by accessing the registry, but some articles or sample code would be
> > > useful.
> > >
> > > Thanks.

Aug 18 '05 #7
ahhhh, now I get ya. Sorry for being a little slow -it's been a very long
week :o))

So, what you need to do is create a custom action (look that up in the help
docs), and link that into your installer.

So, part of the install process is asking the user to set the installation
directory, you capture this datum and enter that into your registry :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I can create the key with a meaningful name--but what do I specify for its
"value" so that the application directory path would be evaluated and stored
in the registry for that key?

Thanks.
"billr" wrote:
I don't know if there is any standard for this, so my advice would be create
a key with a meaningful name.
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
Thanks, I found it. How do I specify the variable to determine the path of
the application directory?

"billr" wrote:

> Yes, my friend, there most definately is.
>
> Use the .Net setup project to create your msi, and whilst in design view,
> you can add entries to the system registry
>
> open the solution explorer window, and along the top you will see a bunch of
> icons you should be able to easily recognise the registry icon :o))
>
> --
> Of all words of tongue and pen, the saddest are: "It might have been"
>
> Bill.Richards @ greyskin .co .uk
> http://greyskin.co.uk
>
>
> "Swami" wrote:
>
> > I guess now my question is how to make the entry for install directory into
> > the registry? I can add a key "InstallDir" for my .NET installation, but is
> > there any property that I can add for the "Value" filed so that the path can
> > evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
> > there is anythign like that in .NET.
> >
> > Thanks.
> >
> >
> >
> > "billr" wrote:
> >
> > > Unfortunately this is only going to be the case if the application you are
> > > interested in makes an entry in the Registry, and not all applications do
> > > (especially .NET apps)
> > >
> > > --
> > > Of all words of tongue and pen, the saddest are: "It might have been"
> > >
> > > Bill.Richards @ greyskin .co .uk
> > > http://greyskin.co.uk
> > >
> > >
> > > "Swami" wrote:
> > >
> > > > I was wondering how I can programmatically find out the path of an installed
> > > > program. I have an application that needs access to a config file that
> > > > resides in the folder of another application. I'm guessing that this can be
> > > > done by accessing the registry, but some articles or sample code would be
> > > > useful.
> > > >
> > > > Thanks.

Aug 18 '05 #8
Thanks! That answers my question :-)

"billr" wrote:
ahhhh, now I get ya. Sorry for being a little slow -it's been a very long
week :o))

So, what you need to do is create a custom action (look that up in the help
docs), and link that into your installer.

So, part of the install process is asking the user to set the installation
directory, you capture this datum and enter that into your registry :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I can create the key with a meaningful name--but what do I specify for its
"value" so that the application directory path would be evaluated and stored
in the registry for that key?

Thanks.
"billr" wrote:
I don't know if there is any standard for this, so my advice would be create
a key with a meaningful name.
--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:

> Thanks, I found it. How do I specify the variable to determine the path of
> the application directory?
>
>
>
> "billr" wrote:
>
> > Yes, my friend, there most definately is.
> >
> > Use the .Net setup project to create your msi, and whilst in design view,
> > you can add entries to the system registry
> >
> > open the solution explorer window, and along the top you will see a bunch of
> > icons you should be able to easily recognise the registry icon :o))
> >
> > --
> > Of all words of tongue and pen, the saddest are: "It might have been"
> >
> > Bill.Richards @ greyskin .co .uk
> > http://greyskin.co.uk
> >
> >
> > "Swami" wrote:
> >
> > > I guess now my question is how to make the entry for install directory into
> > > the registry? I can add a key "InstallDir" for my .NET installation, but is
> > > there any property that I can add for the "Value" filed so that the path can
> > > evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
> > > there is anythign like that in .NET.
> > >
> > > Thanks.
> > >
> > >
> > >
> > > "billr" wrote:
> > >
> > > > Unfortunately this is only going to be the case if the application you are
> > > > interested in makes an entry in the Registry, and not all applications do
> > > > (especially .NET apps)
> > > >
> > > > --
> > > > Of all words of tongue and pen, the saddest are: "It might have been"
> > > >
> > > > Bill.Richards @ greyskin .co .uk
> > > > http://greyskin.co.uk
> > > >
> > > >
> > > > "Swami" wrote:
> > > >
> > > > > I was wondering how I can programmatically find out the path of an installed
> > > > > program. I have an application that needs access to a config file that
> > > > > resides in the folder of another application. I'm guessing that this can be
> > > > > done by accessing the registry, but some articles or sample code would be
> > > > > useful.
> > > > >
> > > > > Thanks.

Aug 18 '05 #9
Perhaps you could click the link to say that the information was helpful.

If you didn't access via the msdn website, here is the link (I ask this
because it will be helpful for other community users)
http://msdn.microsoft.com/newsgroups...3-db398ae39fe1

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
Thanks! That answers my question :-)

"billr" wrote:
ahhhh, now I get ya. Sorry for being a little slow -it's been a very long
week :o))

So, what you need to do is create a custom action (look that up in the help
docs), and link that into your installer.

So, part of the install process is asking the user to set the installation
directory, you capture this datum and enter that into your registry :o))

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Swami" wrote:
I can create the key with a meaningful name--but what do I specify for its
"value" so that the application directory path would be evaluated and stored
in the registry for that key?

Thanks.
"billr" wrote:

> I don't know if there is any standard for this, so my advice would be create
> a key with a meaningful name.
>
>
> --
> Of all words of tongue and pen, the saddest are: "It might have been"
>
> Bill.Richards @ greyskin .co .uk
> http://greyskin.co.uk
>
>
> "Swami" wrote:
>
> > Thanks, I found it. How do I specify the variable to determine the path of
> > the application directory?
> >
> >
> >
> > "billr" wrote:
> >
> > > Yes, my friend, there most definately is.
> > >
> > > Use the .Net setup project to create your msi, and whilst in design view,
> > > you can add entries to the system registry
> > >
> > > open the solution explorer window, and along the top you will see a bunch of
> > > icons you should be able to easily recognise the registry icon :o))
> > >
> > > --
> > > Of all words of tongue and pen, the saddest are: "It might have been"
> > >
> > > Bill.Richards @ greyskin .co .uk
> > > http://greyskin.co.uk
> > >
> > >
> > > "Swami" wrote:
> > >
> > > > I guess now my question is how to make the entry for install directory into
> > > > the registry? I can add a key "InstallDir" for my .NET installation, but is
> > > > there any property that I can add for the "Value" filed so that the path can
> > > > evaluated? I knwo for InstallShield they have [INSTALLDIR]...I wonder if
> > > > there is anythign like that in .NET.
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >
> > > > "billr" wrote:
> > > >
> > > > > Unfortunately this is only going to be the case if the application you are
> > > > > interested in makes an entry in the Registry, and not all applications do
> > > > > (especially .NET apps)
> > > > >
> > > > > --
> > > > > Of all words of tongue and pen, the saddest are: "It might have been"
> > > > >
> > > > > Bill.Richards @ greyskin .co .uk
> > > > > http://greyskin.co.uk
> > > > >
> > > > >
> > > > > "Swami" wrote:
> > > > >
> > > > > > I was wondering how I can programmatically find out the path of an installed
> > > > > > program. I have an application that needs access to a config file that
> > > > > > resides in the folder of another application. I'm guessing that this can be
> > > > > > done by accessing the registry, but some articles or sample code would be
> > > > > > useful.
> > > > > >
> > > > > > Thanks.

Aug 18 '05 #10

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

Similar topics

3
by: Daniel Pope | last post by:
Hello Everybody, I'm preparing for doing a daunting task: to access Out look Microsoft Outlook Express(regardles the operating system and Outlook version) from a Java applet (after the client...
6
by: Alex5222 | last post by:
I am making a program in C++ and was wondering how to make a program access and change the registry. Any help would be greatly appreciated. Thanks.
2
by: Daniel Bass | last post by:
I've found this article on how to get ASP.Net to read/write from the server's registry, but it got heavily critted as being something that you should not do... ...
9
by: Swami | last post by:
I was wondering how I can programmatically find out the path of an installed program. I have an application that needs access to a config file that resides in the folder of another application. ...
2
by: Mostafa Salama | last post by:
i have a problem in accessing registry from web service i made a web service that call a function to access registry The web service contain the following code Dim RegKey As...
3
by: mark.jerrom | last post by:
I'm fairly new to this Web Service game so please feel free to suggest something different if it looks like i'm completely off track! I'm trying to write an application that runs on a Pocket PC...
7
by: Cogito | last post by:
I installed Office 2000 Professional onto a Windows Vista laptop and when I tried to compile the code the following error message appears: 'User-Defined type not defined' I went to check the...
1
by: JLC | last post by:
Hi, I am trying to write a small windows application that you enter a domain\username and a key and hit enter. When you do this, the program will retrieve the password (which was encrypted, but...
1
by: David Schrader | last post by:
Hello all, Let me start by saying that I'm not certain whether this belongs here, in this notes group, or another more developmentally oriented one. I'll try starting here then go elsewhere if...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
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...

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.