Checking an entry in the Registry

Mehyar

Well-known member
Joined
Jun 9, 2003
Messages
371
Location
Lebanon
Does any one know how can i check if a certain folder exists in the registry ???
I dont need to access the key just the folder that contains it.

Thanks in Advance
 
You can try this:

Imports Microsoft.Win32
...
Dim rkey As RegistryKey = Registry.LocalMachine.OpenSubKey("YourKeyOfInterest")
If Not rkey Is Nothing Then
-key exists...
Else
-key does not exist...
End If

You can set Registry.LocalMachine to other values (like Registry.CurrentUser) as needed.
 
Back
Top