howto pull info. from registry?

  • Thread starter Thread starter igul222
  • Start date Start date
I

igul222

the installer of my vb.net app creates a registry key based on user
preferences. how do i pull data from it?
 
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
 
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).
 
Back
Top