How to check that given registry key exists in Vb.Net

By James J

Display code to check if the given registry key exists

Dim IsRegExists As Boolean = False
Try
            
If My.Computer.Registry.CurrentUser.OpenSubKey("Software\Company\Application\1.1") IsNot Nothing Then

'Given registry key is exist...
                 
IsRegExists = True
            
End If
Finally
            My.
Computer.Registry.CurrentUser.Close()
End Try

How to check that given registry key exists in Vb.Net  (1427 Views)