Find registry key using Excel VBA
问题 I want to check if a user has Microsoft SQL Native Client 2008 (sqlncli10) or Native Client 2012 (sqlncli11) installed. Dim key As String Dim myShell As Object Set myShell = CreateObject("WScript.Shell") key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLNCLI11\CurrentVersion\Version" 'key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion" Dim strKey As String strKey = myShell.RegReadkey(key) When looking for the native client I receive the