Showing posts with label List ODBC Drivers. Show all posts
Showing posts with label List ODBC Drivers. Show all posts

Friday, February 3, 2017

VBScript Get a List of the ODBC Drivers

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
    Wscript.Echo StrValueName + " - " + StrValue
Next