Looking for a quick method to find systems with DSN's configured to specific data sources.  Not needing it to be clean but at least something we can parse through with an .XLS report.  I've tried the following but it shows in the inventory list for a small fraction of our systems but most return a null value.



Is there another method that anyone has gotten to work?

0 Comments   [ + ] Show Comments


Please log in to comment



I was also looking at doing this as well for a custom inventory rule.  I think I am going to do this with a vbs script that outputs it to a txt file and the have the K1000 read the contents.


Similar to this:

Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC DATA SOURCES" 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 & " -- " & strValueNext
Answered 03/19/2014 by: HomerM
Purple Belt

  • I saw the VB script on TechNet but it doesn't seem to work (at least on Windows 8.1). Did you have success with that?
Please log in to comment

Try it like this:

ShellCommandTextReturn(cmd /c reg query HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI)

Answered 03/20/2014 by: jknox
Red Belt

  • Will this account for inventory of both 32 and 64 bit nodes for instances where a machine may have ODBC configured for each?
    • I don't remember offhand. It depends on where the registry key is stored for the different versions. It might be in SysWOW.
Please log in to comment
Answer this question or Comment on this question for clarity