views:

480

answers:

3

I have a set of Windows programs that is mostly created with VB6 and VC++ 6. Its installer is created using InstallShield.

A couple users have recently reported a problem trying to install it on Vista. It is complaining that "MDAC 2.6 Sp2 cannot be installed on this machine. MDAC 2.6 Sp2 requires any one of the following configurations", and then lists several OSes, Vista not among them.

A little googling shows that there's a bug in InstallShield's handling of MDAC - it shouldn't be checking for it on Vista, because there is no such thing as MDAC on Vista (there's a new thing - "Windows DAC").

I could make the change to my InstallShield project suggested on that page, but I am concerned about doing so, because I have no way to test it (this problem does not occur on all Vista machines, and I haven't been able to make it happen on any Vista machine I have access to).

However, after looking at Wikipedia's page on MDAC, I can't imagine why we would need it for our programs in the first place. We're not using any databases, at least not explictly (maybe some Microsoft component that we're using is using it, though?).

I was not the original author of the InstallShield project. I am beginning to suspect that MDAC might have been inadvertantly added to it, or perhaps advertantly but just as "uhhh, maybe we need that".

How can I explicitly tell whether my programs need MDAC or not? I can look at the references and such in the VB6 and VC++ projects; is there any way to tell from those whether I can safely remove MDAC from the InstallShield project? For example, perhaps there's a single MDAC reference which, if not present in my VB/VC++ projects, means that my programs definitely do not require MDAC?

Thanks in advance for any help.

+4  A: 

I expect you are right, MDAC was probably included with the original InstallShield project configuration, and nobody has bothered to remove it.

On the VB6 side you should be able to tell if MDAC is being used by going into the "References" dialog (I think its in the Projects dropdown menu of the ide) and checking to see if there is anything in there to do with MDAC or MSAccess. I haven't worked with VB6 in a while, but the text should look something like "Microsoft ActiveX Data Objects 2.x Library".

I'm guessing it is less likely that it is being used On the C++ side, but you could try searching for keywords like msdado, mdac and msaccess to see if theres any sign of a #import on one of the mdac dlls.

Greg Malcolm
A: 

Beginning I think with Windows XP Microsoft began including MDAC. However, in MDAC version 2.6 and later they no longer included the Jet 4.0 components. (Jet 4.0 SP8 can be found here)

If you are using Visual Fox Pro you need to install either the ODBC or OLEDB drivers depending on you code for that. ODBC OLEDB

All of these downloads depend on having at least MDAC 2.6 installed.

Beaner
+3  A: 

When deploying to Windows XP and later there is no reason to include MDAC or Jet 4.0, since even XP RTM (gold) shipped with MDAC 2.7 as well as Jet 4.0.

Microsoft Data Access Components (MDAC) release history

How to obtain the latest service pack for the Microsoft Jet 4.0 Database Engine goes into more recent Jet history.

MDAC releases include compatibility typelibs for ADO, so even if your program was compiled against MDAC 2.6 it will actually use the latest ADO on a target machine. The real grief can come if the program early-binds to ADOX.

ADOX never shipped with appropriate compatibility interfaces, so programs should almost always use late binding with ADOX.

DAO is another issue, but (a.) nobody should really be using it anymore without a good excuse and (b.) it died at DAO 3.6 so there should be no compatibility issue as long as your programs were upgraded to 3.6 and Jet5x (Jet 4.0, Access 2000 format).


The story gets more complicated when deploying downlevel from XP of course.

Bob Riemersma