ODBC & ADO installation


What is the safest/ most reliant way to find out if ODBC 3.5, ADO and Access Driver is installed on a computer?
I know that if I install MDAC I will get all that, but they could be there without MDAC installed and I don't want to install MDAC if I don't have to.
So, which are the keys I should read i registry to find out these three things?
(There are so many ODBC-things in the registry I don't know which one I should rely on.)
Who is Participating?
AssafgoConnect With a Mentor Commented:
First, it doesn't hurt to install MDAC, it actually fixed bugs in odbc 3.7 for SQL Server in my case.
Second, all the information you need can be viewed easily from Control Panel->Odbc Data Sources.
There you can find which Odbc drivers are installed, which versions, and what dll's are they using.
All administration can be done from there.
ScattanAuthor Commented:
Thank you Assafgo, but I'm writing an installation program and cannot go to the control panel etc. to see which installations the computer that the program will be installed on has, I need to do it programmatically.
That's why I don't want to install MDAC if I don't have to, or promt the user to do it if the installation program cannot find the required software.
So do you have any tips on which registry keys I can check for instead?

In this case - simple.
The installed odbc drivers are written in the odbcinst.ini in the windows folder.
If you want to get their versions (it's not there, only the names), then go to the registry for
and there you can find what's installed.
under each subkey of HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI you may also find the details (version, etc..)
Good luck
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

ScattanAuthor Commented:

And what about ADO?
ADO is actually an ActiveX component.
To find if it exists, you can use programming methods (QueryInterface...)
The problem is that there are many interfaces to ADO, as you can see in the registry keys under
HKEY_CLASSES_ROOT\ADOConnectObject.ADOConnectObject and anything else that starts with the name ADO.

another way I think will suffice is to check that the file Msadodc.ocx exists
(and you can know the version that way also)
ScattanAuthor Commented:
OK, thats not the best answer, but its good enough, thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.