Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
oReg.EnumValues intRoot,strKeyPath,arrValueNames
For i=0 To UBound(arrValueNames)
oReg.GetStringValue intRoot, strKeyPath,arrValueNames(i),strvalue
If arrValueNames(i)=checkkey Then
Msgbox checkkey&"存在"
Exit for
End If
If i=UBound(arrValueNames) and arrValueNames(i)<>checkkey Then
Msgbox checkkey&"不存在"
End If
Next