Here is some old old vb.net code I dug up.
Notice the imports and the bad hungarian notation.
Imports Microsoft.Win32
Public Class RegReader
Public Shared Function ReadRegValue(By Val strKeyName As String) As
String
Dim regVersion As RegistryKey
Dim keyValue As String
keyValue = "SOFTWARE\\MySu bThingLikeMicro soft"
regVersion = Registry.LocalM achine.OpenSubK ey(keyValue, False)
Dim strRegistryValu e As String
strRegistryValu e = string.Empty
If (Not regVersion Is Nothing) Then
strRegistryValu e = regVersion.GetV alue(strKeyName , "")
regVersion.Clos e()
End If
return strRegistryValu e
End Function
End Class
"jonefer" <jo*****@discus sions.microsoft .comwrote in message
news:7B******** *************** ***********@mic rosoft.com...
How can I lookup registry values?
I'd like to check for the existence of this folder in the registry:
HKLM\Software\A cmeCompany\MWIA pplications\Aut oLogonForShared Workstations
so that I can use a login prompt for only these machines.
Has anyone ever done this?