HOWTO: Use the MDAC Standalone Setup EXE in Unattended Mode

ID: Q177913

The information in this article applies to:

SUMMARY

There are two ways that you can install the Microsoft Data Access Components (MDAC) 1.5 components (ODBC 3.5, OLE DB 1.5, ActiveX Data Objects [ADO] 1.5, Remote Data Service [RDS] 1.5). The first way is the MDAC Standalone setup, which contains run-time components, samples, documentation, headers and libraries. The second way is the MDAC Redistribution, which contains just the run-time components. The MDAC Redistribution is bundled two ways. One MDAC Redistribution package contains just the SQL Server ODBC Driver (plus MDAC 1.5 run-time components) and is 1.7 MB in size. The second bundle adds the Microsoft Access and Oracle ODBC Drivers and is almost 4 MB in size.

This article discusses how you can customize the use of the MDAC Standalone setup. For most scenarios, though, the MDAC Redistribution is a superior choice because of reduced dependencies and a much smaller disk footprint.

MORE INFORMATION

The MDAC Standalone setup was originally created as part of the setup for the Windows NT 4.0 Option Pack. As such, it uses a setup technology that is operating system dependent. That is, you cannot run the Windows 95 version of the MDAC Standalone on Windows NT, and vice versa. Further, the MDAC Standalone setup requires that you apply both OLE Automation and the Comctl32.dll patches on the target computer before running the setup. The MDAC Redistribution also requires OLE Automation.

For information on using the MDAC Redistribution, OLE Automation or the Comctl32.dll patch, please see the articles listed in the REFERENCES section.

The Unattend.txt file contains a way to specify which components you want installed by the MDAC Standalone. However, it can be misleading because the MDAC Standalone knows about dependencies that may exist between the components. For example, the OLE DB provider for ODBC Drivers 1.5 is now a core component of ODBC version 3.5. So, you can specify what you believe is a minimal installation, but the MDAC Standalone contains business rules to ensure that you absolutely get a minimal installation. The OLE DB provider for ODBC is indeed part of ODBC although what you see at first may not appear to be a minimal installation.

For more information on the dependency between ODBC 3.5 and the OLE DB Provider for ODBC Drivers in OLE DB 1.5, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q178852
   TITLE     : INFO: OLE DB Provider for ODBC Now an ODBC 3.5 Core
               Component

Developers are often concerned about the size of the redistribution. MDAC Redistribution is at minimum 2 MB smaller than the MDAC Standalone. The bulk of the MDAC Redistribution's size is not in ADO or RDS (which are only about 500K of the total compressed size), but in ODBC and the ODBC drivers.

The MDAC components (with the exception of ODBC) are not supported on Windows NT 3.51. You cannot use the MDAC Standalone EXEs to install on Windows NT 3.51. The MDAC Redistribution, however, can run on Windows NT 3.51. OLE DB, ADO, and RDS have not been tested nor are they supported on Windows NT 3.51 platforms.

For Intel platforms, there is no functional difference between the MDAC Standalone EXE's for Windows NT Workstation and Windows NT Server. You could use either executable to install on any version of Windows NT 4.0.

Both the MDAC standalone and MDAC Redistribution are capable of performing an installation that does not require a reboot. However, you still need a reboot, the standalone/redistribution itself does not perform the reboot automatically. For the MDAC standalone, you would follow the instructions given further below. For the MDAC Redistribution, you would use one of the command line switches below, which invokes an unattended install that does NOT automatically reboot although it most likely needs a reboot:

   mdacfull /q /C:"setup /QN1"

The following switch runs Acme setup in the unattended mode and not automatically reboot with a minimalist UI.

   mdacfull /q /C:"setup /QNT"

With this feature, there is no significant reason why you should use the MDAC Standalone over the MDAC Redistribution. The redistribution is smaller, does not install SDK elements, and does not have as many external dependencies.

The MDAC Standalone does offer more bells and whistles with the Unattend.txt feature given below, but offers no significant advantage. The disadvantages are larger size, platform-specific version, and installation of SDK elements you do not need in a redistribution scenario.

Steps to Use Unattend.txt

1. Delete any sub-directories in the C:\Windows\temp folder that begin with

   "IX".

2. Create a new directory called C:\test.

3. Copy the attached Unattend.txt file into the new directory. The text for

   the Unattend.txt file is below under "Contents of Unattend.txt".

4. Assuming you are installing with Windows 95, copy the MDAC Standalone
   for Windows 95 (Mdac_95.exe) into the new directory. For Windows NT, you
   can use either Mdac_nts.exe or Mdac_ntw.exe on either Windows NT Server
   or Windows NT Workstation.

5. From the Start menu, choose Run, and enter one of the following commands
   (all on one line):

      C:\test\mdac_95.exe -q -c:"sysocmgr -n -i:dagsasu.inf
        -s:c:\Windows\temp\ixp000.tmp -u:c:\test\unattend.txt"

   The preceding command runs the MDAC Standalone, using the Unattend.txt
   File to determine which components are, or are not, installed. The
   actual command has been word wrapped to fit the margin limitations of
   this article. There is an automatic reboot, and the user does not have
   any control over the setup but will see progress dialogs.

      C:\test\mdac_95.exe -q -c:"sysocmgr -n -r -i:dagsasu.inf
        -s:c:\Windows\temp\ixp000.tmp -u:c:\test\unattend.txt"

   The preceding command runs the MDAC Standalone, using the Unattend.txt
   file to determine which components are, or are not, installed. The
   actual command has been word wrapped to fit the margin limitations of
   this article. The addition of the -r switch ensures that there is no
   reboot upon completion of the setup. The user does not have any control
   over the setup but will see progress dialogs.

The MDAC Standalone setup is a setup within a setup. The outer setup provides one file for the entire distribution, which is unpacked and includes a file called Dagsasu.inf. The inner setup, when called, uses both Sysocmgr and Dagsasu.inf to install the MDAC 1.5 components.

Of course, if you want a quiet and full install of all the MDAC components, there is no need to use the Unattend.txt file. The following statement installs the MDAC components with a dialog box to show progress and an automatic reboot:

   mdac_95.exe -q

Steps to Use Unattend.txt Without a Reboot

1. Delete any sub-directories in the C:\Windows\temp folder that begin with

   "IX".

2. Create a new directory C:\test.

3. Copy the attached Unattend.txt file into the new directory. The text for

   the Unattend.txt file is below under "Contents of Unattend.txt".

4. If you are installing with Windows 95, copy the MDAC Standalone for
   Windows 95 (Mdac_95.exe) into the new directory. For Windows NT, you can
   use either Mdac_nts.exe or Mdac_ntw.exe on either Windows NT Server or
   Windows NT Workstation.

5. From the Start menu, choose Run, and enter the following command (all on
   one line):

      C:\test\mdac_95.exe -q  -c:"sysocmgr -n -r -i:dagsasu.inf
        -s:c:\Windows\temp\ixp000.tmp -u:c:\test\unattend.txt"

   Use the -r switch to ensure that no reboot occurs after the MDAC
   Standalone completes its work.

Contents of Unattend.txt

   [Version]
   Signature = "$CHICAGO$"
   ; Choose one of the following, for the appropriate OS:
   ; Signature = "$CHICAGO$" for W95
   ; Signature = "$Windows NT$"

   [Global]
   FreshMode = Custom
   MaintanenceMode = AddRemove
   UpgradeMode = AddExtraComps

   ; Syntax:
   ; FreshMode = [ Minimal | Typical | Custom ]
   ;
   ; NOTE: FreshMode is used if the registry does not contain the
   ; HKLM\Software\Microsoft\DataAccess\Version key.
   ;
   ; NOTE: If the computer is in FreshMode, but no "FreshMode=" line is
   ; specified, then Typical is the default value.
   ;
   ; MaintanenceMode = [ AddRemove | ReinstallFile | ReinstallComplete |
   ; RemoveAll ]
   ;
   ; NOTE: MaintenanceMode is used if the registry contains the
   ; HKLM\Software\Microsoft\DataAccess\Version key, and the value matches
   ; the current version of the MDAC setup.
   ;
   ; NOTE: If the computer is in MaintanenceMode, but no "MaintanenceMode="
   ; line is specified, then ReinstallComplete is the default value.
   ;
   ; UpgradeMode = [ UpgradeOnly | AddExtraComps ]
   ;
   ; NOTE: UpgradeMode is used if the registry contains the
   ; HKLM\Software\Microsoft\DataAccess\Version key, and the value is less
   ; than the current version of the MDAC setup.
   ;
   ; NOTE: If the computer is in UpgradeMode, but no "UpgradeMode=" line is
   ; specified, then UpgradeOnly is the default value.
   ;
   ; WARNING: Do not manually modify the
   ;                       HKLM\Software\Microsoft\DataAccess\Version
   ; key - An incorrect value could result in an improper or unusable
   ; installation.

   [Components]
   ; Syntax: <sub-component name>=[ ON | OFF ]
   ;
   ; NOTE: The [components] section is used to control which files
   ; will be installed. It is used only when:
   ; * FreshMode = Custom or
   ; * MaintanenceMode = AddRemove or
   ; * UpgradeMode = AddExtraComps
   ;
   ; NOTE: It may not be possible to turn certain components OFF due to
   ; dependencies and/or the previous installed state of MDAC components.

   MDAC_ADO_CORE = ON
   ; MDAC_ADO_CORE is required, and contains ODBC, OLE DB, and ADO core
   ; files.

   MDAC_ADO_DOC = ON
   ; MDAC_ADO_DOC add HTML Help for ADO.

   MDAC_RDS_CORE = ON
   ; MDAC_RDS_CORE adds the Remote Data Services.

   MDAC_RDS_DOC = ON
   ; MDAC_RDS_DOC adds HTML Help for Remote Data Services (RDS).

   MDAC_RDS_SAMPLE = ON
   ; MDAC_RDS_SAMPLE adds RDS samples.

   MDAC_RDS_11 = ON
   ; MDAC_RDS_11 adds the RDS 1.1 release.

   MDAC_DRV_BRAZOS = ON
   ; MDAC_DRV_BRAZOS adds the JET database engine and the Microsoft Access
   ; ISAM and ODBC Drivers.

   MDAC_DRV_SQLSRV = ON
   ; MDAC_DRV_SQLSRV adds the SQL Server ODBC driver.

   MDAC_DRV_ORACLE = ON
   ; MDAC_DRV_ORACLE adds the Microsoft ODBC driver for Oracle.

How to Modify Unattend.txt

The version of Unattend.txt installs all of the run-time components. The default does not install Oracle, the samples, the documents or the RDS11 components. For example:

   MDAC_RDS_SAMPLE = ON
   ; MDAC_RDS_SAMPLE adds RDS samples.

   MDAC_RDS_11 = ON
   ; MDAC_RDS_11 adds the RDS 1.1 release.

   MDAC_DRV_ORACLE = ON
   ; MDAC_DRV_ORACLE adds the Microsoft ODBC driver for Oracle.

This is how you determine which components install in an unattended installation. If you do not want to install the Oracle driver change the Oracle driver line as follows:

   MDAC_DRV_ORACLE = OFF
   ; MDAC_DRV_ORACLE adds the Microsoft ODBC driver for Oracle.

Remember, test these on a clean computer, as the install changes to maintenance mode if you are installing over a previous setup.

REFERENCES

This article is one of a series dealing with the redistribution of MDAC components; ODBC, OLE DB, ADO, RDS, the MDAC Standalone, MDAC Redistribution and the Data Access SDK. The whitepaper "Redistributing Microsoft Data Access Components" presents a comprehensive overview of this subject, including referencing the content of this Knowledge Base article. This whitepaper is located at the following Web address:

   http://www.microsoft.com/msdn/news/feature/datajul98/redistmdac.htm

For more information on using the MDAC Redistribution, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q181126
   TITLE     : INFO: Redistribution for MDAC 1.5 Components Available

For more information on acquiring the OLE Automation patch, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q180071
   TITLE     : FILE: Msvbvm50.exe Installs Visual Basic 5.0 Run-Time Files

For more information on acquiring the Comctl32.dll patch, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q165487
   TITLE     : Incorrect or Garbled Text on Tab Labels in Properties


http://www.microsoft.com/data/

Additional query words: Silent Install

Keywords          : kbcode kbHTMLHelp 
Version           : WINDOWS:1.5
Platform          : WINDOWS
Issue type        : kbhowto

Last Reviewed: December 16, 1998