Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/73dfa8f572b6fa4b81c89318b3feba4a to your computer and use it in GitHub Desktop.
Save ezhov-da/73dfa8f572b6fa4b81c89318b3feba4a to your computer and use it in GitHub Desktop.
vba получение списка всех драйверов
Public Sub sdfsdfgsdgsdg()
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers"
objRegistry.EnumValues HKEY_LOCAL_MACHINE, strKeyPath, arrValueNames, arrValueTypes
For i = 0 To UBound(arrValueNames)
strValueName = arrValueNames(i)
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
a = arrValueNames(i) & " -- " & strValue
Debug.Print a
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment