Home All Groups Group Topic Archive Search About

howto pull info. from registry?

Author
17 Feb 2006 1:35 PM
igul222
the installer of my vb.net app creates a registry key based on user
preferences. how do i pull data from it?

Author
17 Feb 2006 1:59 PM
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
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

Show quoteHide quote
"igul222" <TFBFQF4***@gmail.com> schreef in bericht
news:1140183322.581990.166450@g44g2000cwa.googlegroups.com...
> the installer of my vb.net app creates a registry key based on user
> preferences. how do i pull data from it?
>
Author
17 Feb 2006 2:31 PM
Herfried K. Wagner [MVP]
"igul222" <TFBFQF4***@gmail.com> schrieb:
> 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).

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>