howto pull info. from registry?

I

igul222

the installer of my vb.net app creates a registry key based on user
preferences. how do i pull data from it?
 
P

Peter Proost

Hi, at the top of your class

Imports Microsoft.Win32

'then

Dim oRegKey As RegistryKey
Dim oBaseKey As RegistryKey

oBaseKey = Registry.CurrentUser
oRegKey = oBaseKey.OpenSubKey("Software\YourProgram")

If not oRegKey Is Nothing Then
Dim val As Object = oRegKey.GetValue("ValueName")
key.Close
End If

Hope this helps

Greetz Peter
 
H

Herfried K. Wagner [MVP]

igul222 said:
the installer of my vb.net app creates a registry key based on user
preferences. how do i pull data from it?

Check out the 'Microsoft.Win32.Registry' class (no additional references
required).
 

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