Espero que esta funcion te sirva:
Para usarla pone:
Si existe la clave Microsoft te devuelve TRUE.
Saludos.-
Código [Seleccionar]
Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Public Const HKEY_CURRENT_CONFIG = &H80000005
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Function RegComprobarClave(Key As String, Subkey As String) As Boolean
Dim regRes As Long
Key = LLave(Key)
RegOpenKey Key, Subkey, regRes
If regRes = 0 Then
RegComprobarClave = False
Else
RegComprobarClave = True
End If
RegCloseKey regRes
End Function
Para usarla pone:
Código [Seleccionar]
MsgBox RegComprobarClave(HKEY_LOCAL_MACHINE, "Software\Microsoft")
Si existe la clave Microsoft te devuelve TRUE.
Saludos.-