Microsoft KB Archive/257604

= FILE: Install DCOM and MDAC Through a Windows Installer Package =

Article ID: 257604

Article Last Modified on 3/29/2007

-

APPLIES TO

 Microsoft Visual Studio Installer 1.0 Microsoft Windows Installer 1.1, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows 95

 Microsoft Windows 98 Standard Edition

 Microsoft Windows NT 4.0</li></ul>

 the hardware: DEC Alpha</li></ul> </li> Microsoft Windows Installer 1.0, when used with:  Microsoft Windows 2000 Standard Edition</li></ul>

 Microsoft Windows 95</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul>

 Microsoft Windows NT 4.0</li></ul>

 the hardware: DEC Alpha</li></ul> </li> Microsoft Visual Studio .NET 2003 Enterprise Architect</li> <li>Microsoft Visual Studio .NET 2003 Enterprise Developer</li> <li>Microsoft Visual Studio .NET 2003 Academic Edition</li> <li>Microsoft Visual Studio .NET 2002 Professional Edition</li> <li>Microsoft Visual Studio .NET 2002 Enterprise Architect</li> <li>Microsoft Visual Studio .NET 2002 Enterprise Developer</li> <li>Microsoft Visual Studio .NET 2002 Academic Edition</li></ul>

-

<div class="notice_section">

This article was previously published under Q257604

<div class="summary_section">

SUMMARY
The Microsoft Data Access Component (MDAC) merge module (MDAC.msm) that is included in Visual Studio Installer 1.0 only detects the presence of this system component. It does not install MDAC. This article provides a sample executable file that encapsulates the MDAC installation with a Microsoft Installer (MSI) package.

<div class="moreinformation_section">

MORE INFORMATION
MDAC and DCOM are vital to many applications written for the Win32 platform. A requirement of the Application Specification for Microsoft Windows 2000 for Desktop Applications desktop applications is to use the Windows Installer. However, because MDAC and DCOM redistributable merge modules do not exist, DCOM and MDAC installation must be done outside of a Windows Installer .msi file. You can use this sample, Wrapper.exe, as-is or modify it to meet custom needs. The following file is available for download from the Microsoft Download Center:

WrapperSetup.exe

Release Date: August 31, 2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Command Line Options
Wrapper.exe command line switches are the same as the Windows Installer, Msiexec.exe. For example, the following command line would install and create a verbose log file:

C:\Wrapper> Wrapper.exe /i MyMsi.MSI /l*v C:\Wrapper\MyLog.txt

For more information, visit the following Microsoft Web site: Command Line Options

To customize your wrapper and build in the command line parameters, modify the function call to RegWriteCmdLine in MTSetup.cpp as in the following example code: if(!lstrcmp(__argv[1],"DCOMREBOOT")) {  ... } else if(!lstrcmp(__argv[1],"MDACREBOOT")) {  ... } else {  // Comment out the following line //RegWriteCmdLine(lpCmdLine);

RegWriteCmdLine(TEXT("/i MyInstallationPackage.MSI")); }

Directory Structure
The following directory structure is required by Wrapper.exe: <ul> <li>DCOM98 and MDAC setup packages (DCOM95.EXE and MDAC_TYP.EXE) must be placed in the same folder as Wrapper.exe. Setup will fail if these files are not present</li> <li>The Windows Installer redistributable files, InstMsi.exe, must be placed in different "WinNT" and "Win9x" subfolders of the folder where Wrapper.exe resides. Obtain the Windows Installer redistributables by downloading these files from the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=105dfc41-801e-4441-aa75-7696d794f109&DisplayLang=en

</li> <li>You can place the MSI package anywhere in the folder structure as long as the appropriate path is included on the command line.</li></ul>

MDAC
Wrapper.exe only checks for the presence of MDAC 2.1 or later. If a specific version is required for your application, you must customize the source code. The IsMDACPresent function in MDAC.cpp is the location of the check.

Wrapper.exe will install the version of MDAC (MDAC_TYP.exe) that you place in the Wrapper.exe folder. For example, if you place version 2.5 of MDAC in the Wrapper.exe folder, version 2.5 will be installed. Several different versions of MDAC are available from:

Universal Data Access Web Site

You must be a local administrator on the computer in order to install MDAC.

DCOM
DCOM must only be installed on computers running Windows 95. It is already present in Windows 98, Windows 98SE, Windows NT 4.0, and Windows 2000. The redistributable version of DCOM is available at the following Web site:

DCOM95 for Windows 95, version 1.3

Renaming the Executable
If you want to rename the executable file, do the following: <ol> <li> Modify the following variable in MTSetup.h: static const TCHAR g_szAppName[] = TEXT("Wrapper"); </li> <li>On the Project menu, click Settings.</li> <li>Select the Link tab.</li> <li>In the Category list, select General.</li> <li>Modify the output file name.</li> <li>Recompile.</li></ol>

Installation Algorithm
Wrapper.exe performs the following detection and installation tasks:
 * 1) On Windows 95, installs DCOM if it is not present and reboots the computer.
 * 2) Uses Instmsi.exe to install the Windows Installer service if it is not present.
 * 3) Installs MDAC if it is not present and reboots the computer.
 * 4) Installs the MSI package specified by the command line.

The self-extracting file WrapperSetup.exe contains the following files:

What's New in WrapperSetup.exe (6/21/2000 and later)

 * 1) The executable performs additional MDAC detection.
 * 2) A RunOnce registry key bug was fixed.
 * 3) An icon was added to the executable.
 * 4) A version resource was added to the executable.
 * 5) The executable will run from a root directory.
 * 6) A long filename directory bug was fixed.

Additional query words: WrapperSetup MDAC DCOM VSI MSI SETUP MSM Merge Module

Keywords: kbdownload kbfile kbhowto kbsetup KB257604

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.