Get the path of an application from the registry

A

Amjad

Can anyone tell me how to read the path value of an
already installed and registered application called "Palm
Desktop" from the Windows Registry?

I just want my VB program to determine where this
application has been installed.

I know that the application's key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Palm Computing\Palm
Desktop\4.0.1


Amjad
 
H

Herfried K. Wagner [MVP]

* "Amjad said:
Can anyone tell me how to read the path value of an
already installed and registered application called "Palm
Desktop" from the Windows Registry?

I just want my VB program to determine where this
application has been installed.

I know that the application's key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Palm Computing\Palm
Desktop\4.0.1

Have a look at the 'Microsoft.Win32.Registry' class and its methods.
 
A

Amjad

Yes I looked into the 'Microsoft.Win32.Registry' class
and its methods. Do you know what method gets the "path"
value of an open registry key?

Amjad
 
H

Herfried K. Wagner [MVP]

* "Amjad said:
Yes I looked into the 'Microsoft.Win32.Registry' class
and its methods. Do you know what method gets the "path"
value of an open registry key?

You can use the 'GetValue' method of an instance of 'RegistryKey' to get
its value. What's the "path" value?
 
J

Jay B. Harlow [MVP - Outlook]

Amjad,
As Herfried stated you need to use the Microsoft.Win32.RegistryKey class.
First you need a root RegistryKey object. You can use the
Microsoft.Win32.Registry class's shared fields to get the local machine
(HKEY_LOCAL_MACHINE) root key.

Dim root as RegistryKey = Registry.LocalMachine

Then from root you can open up the rest of the path.

Const SubKey As String = "SOFTWARE\Palm Computing\Palm Desktop\4.0.1"

Dim key As RegistryKey = root.OpenSubKey(SubKey)

From there you will need to know how the values & subkeys of the Palm
Desktop are organized & use the respective members of RegistryKey.

For a more complete example, see RegistryKey.GetValue.

Hope this helps
Jay
 
A

Amjad

What I meant by "path value" is the location of where the
Palm Desktop has been installed. For example: "c:\Program
Files\Palm"

I want to display this location path!
 

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