/build/static/layout/Breadcrumb_cap_w.png

KACE - Custom Inventory for ODBC connections

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.

ShellCommandTextReturn(reg query HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI) 

 

Is there another method that anyone has gotten to work?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: HomerM 10 years ago
Purple Belt
1

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

Comments:
  • 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? - sgreenwall 10 years ago
Posted by: jknox 10 years ago
Red Belt
1

Try it like this:

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


Comments:
  • Will this account for inventory of both 32 and 64 bit nodes for instances where a machine may have ODBC configured for each? - sgreenwall 9 years ago
    • I don't remember offhand. It depends on where the registry key is stored for the different versions. It might be in SysWOW. - jknox 9 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ