MDAC 2.5 SDK - Technical Articles


 

Redistributing MDAC

Each release of MDAC includes a matched set of modules. These modules were tested together when they were released by Microsoft. The interdependencies of the modules are not simple; they must all be distributed as a set. Although it's tempting to try to distribute only the modules for the components that you think your application may need, there is no supported way to do that. Other applications will use MDAC components, and if they aren't part of the same released set, the applications will probably crash.

Note   Each release of MDAC includes a license agreement, which gives you specific rights to redistribute some of the files in MDAC. This article does not change the terms of the license agreements in any way.

The current version of MDAC includes a redistributable MDAC setup, in the file mdac_typ.exe. This program is a self-extracting compressed file that installs the run-time components onto a workstation.

The ADO components (including RDS) and some OLE DB modules require Microsoft Windows NT® and Microsoft Windows® 2000 Administrator privileges to install and register correctly.

As of MDAC 2.1 and later, the stand-alone and the redistributable MDAC setup programs will not update files on a Windows 2000 system. With the release of Windows 2000, MDAC is part of the operating system and must be updated using operating system service packs.

MDAC setup has several modes to customize installation.

Standard Setup

Standard setup is the recommended mode. This mode emphasizes the fact that the user's system is being upgraded and offers the option to abort the installation if necessary. A setup may also involve rebooting the machine, and this method gives users maximum control over the timing of the reboot.

To run MDAC setup in standard mode, simply execute mdac_typ.exe with no command-line parameters. This will bring up all necessary user interface dialogs to allow the user to install MDAC.

MDAC setup will extract all of the files in mdac_typ.exe to the user's TEMP directory. From there, it will run the setup programs setup.exe and acmsetup.exe. The setup program will display the license agreement, which the user must accept in order to proceed. Then the user will have two options: either select a complete installation of MDAC or exit the setup program. After the files are copied, the user will be notified if the workstation must be rebooted. The user can choose to reboot immediately or wait until later.

Automatic Setup

This mode completely installs MDAC with no prompting. To run MDAC setup in automatic mode, use the following syntax at the command prompt:

   mdac_typ /Q

MDAC setup will perform a complete installation and will reboot the computer if necessary. It will also create a detailed log file, mdacset.log, in the Windows root directory.

This is not a "silent" setup. The user will not have to accept the license agreement, but the user will see windows showing that files are being copied onto the workstation.

This mode is most appropriate when MDAC is being installed as part of a setup program for a larger application.

File Extraction

In this mode, MDAC setup merely extracts all of the files in mdac_typ.exe to a folder and then exits. It does not install MDAC. To run MDAC setup in file extraction mode, use the following syntax at the command prompt:

   mdac_typ /C /T:<full path>

For example, to extract all of the files in mdac_typ.exe to the folder "C:\MDAC FILES", use the following command:

   mdac_typ /C /T:"C:\MDAC FILES"

You do not have to create the folder before extracting files to it. MDAC setup will create the folder for you if it doesn't exist.

This is also not a "silent" setup; the user will have to accept the license agreement to extract the files. Once accepted, all of the files will be copied to the folder provided. The user will see a window indicating that the files are being copied. After the files are all copied, no further user interaction will be required.

Logging

In the standard mode, MDAC setup creates a summary log. This log is not as detailed as the log created in the automatic mode. To create a detailed log in standard mode, use the following syntax at the command prompt:

   mdac_typ /C:"setup /GC <file name>"

For example, to create a detailed log in the file "C:\MDAC_LOG.TXT", use the following command:

   mdac_typ /C:"setup /GC C:\MDAC_LOG.TXT"

Silent Setup

This mode installs MDAC with almost no visible user interface at all. This mode should be used only as part of a larger application setup program that can handle any problems that may arise during installation. To run MDAC setup in silent mode, use the following syntax:

   mdac_typ /Q:A /C:"setup /QNT"

This will completely install MDAC but will not reboot the workstation. A reboot may be required to complete the installation, so the larger application setup program should reboot when it has completed its setup.

Manual Setup

Microsoft does not recommend or support manual setup of the MDAC files. Use only the redistributable program mdac_typ.exe to distribute MDAC, in accordance with the license agreement.

ODBC Notes

In general, it is safe to mix and match ODBC drivers with ODBC Driver Manager/Core Components. You should make sure the ODBC Driver Manager is more recent than the ODBC drivers, even though the product group attempts to ensure that the ODBC Driver Manager and Microsoft ODBC drivers are backward compatible.

Redistributing ODBC 3.0 Files

The developer using ODBC is responsible for redistributing the ODBC support files. Redistribution of ODBC 3.0 is not intuitive, so Microsoft Product Support Services has created a sample to demonstrate an ODBC setup. This unsupported sample is a thin wrapper built on top of the Microsoft Windows Setup API. See Knowledge Base article Q174191, "SAMPLE: ODBC 3.0 Installation" for details on this sample.