HOWTO: Add the MDAC Redistribution Setup to CAB Files |
When developing applications with ActiveX Data Objects (ADO) it may become
necessary to distribute the Microsoft Data Access Components (MDAC). You
can redistribute the MDAC run-time components via the MDAC redistribution
EXE.
For Internet and Intranet environments, installing .ocx(s), .dll(s) and
ActiveX document(s) require the use of CAB files. CAB files contain the
components of your application and an .inf file that determines when, how
and where these components install. In many cases, the CAB file references
other CAB files. When distributing MDAC components you should use the
Mdacfull.exe file. This file contains the MDAC redistribution setup EXE.
You need the Mdacfull.exe file for this article. The file is located at the
following URL:
http://www.microsoft.com/data/downloads.htm
The following information references an .ocx file that requires ADO. The
.ocx is referred to as msftNexus.ocx. To add the MDAC redistribution setup
(CAB) to your application's CAB file for browser installation, please
follow these steps
http://www.microsoft.com/workshop/management/cab/cabdl.aspDownload the SDK and extract it into a useful directory.
CABARC n mdacfull.cab mdacfull.exe
C:\InetPub\wwwroot MDACFULL.EXE=MDACFULL.EXE.Here is an example:
[Add.Code]
Msftnexus.ocx=Msftnexus.ocx
Msstkprp.dll=Msstkprp.dll
Comctl32.ocx=Comctl32.ocx
Asycfilt.dll=Asycfilt.dll
Msvbvm50.dll=Msvbvm50.dll
Mdacfull.exe=Mdacfull.exe
[MDACFULL.EXE]
FileVersion=4,71,0819,0
Hook=MDAC
[MDAC]
file-win32-x86=http://yourwebserver/mdacfull.cab
run=%EXTRACT_DIR%\Mdacfull.exe /q
Be sure to change the address of the CAB file to its appropriate
location. You may place the CAB in any Web directory. The /q parameter
executes the setup in partial quiet mode. The user sees an
extraction screen, however they are not prompted for any input.
;INF file for MsftNexus.ocx
;DestDir can be 10 for Windows directory, 11 for Windows\System(32)
;directory, or left blank for the Occache directory.
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
Msftnexus.ocx=Msftnexus.ocx
Msstkprp.dll=Msstkprp.dll
Comctl32.ocx=Comctl32.ocx
Asycfilt.dll=Asycfilt.dll
Msvbvm50.dll=Msvbvm50.dll
Mdacfull.exe=Mdacfull.exe
[MSFTNEXUS.OCX]
file-win32-x86=thiscab
RegisterServer=yes
clsid={FD2B0C9D-E6B9-11D1-9BE7-00C04FB9D91A}
DestDir=
FileVersion=1,0,0,0
[MSSTKPRP.DLL]
hook=MsStkPrp.cab_Installer
FileVersion=5,1,43,19
[MsStkPrp.cab_Installer]
file-win32-x86=http://activex.microsoft.com/controls/vb5/MsStkPrp.cab
InfFile=MsStkPrp.inf
[COMCTL32.OCX]
hook=ComCtl32.cab_Installer
clsid={9ED94440-E5E8-101B-B9B5-444553540000}
FileVersion=5,1,43,19
[ComCtl32.cab_Installer]
file-win32-x86=http://activex.microsoft.com/controls/vb5/ComCtl32.cab
InfFile=ComCtl32.inf
[ASYCFILT.DLL]
hook=AsycFilt.cab_Installer
FileVersion=2,20,4118,1
[AsycFilt.cab_Installer]
file-win32-x86=http://activex.microsoft.com/controls/vb5/AsycFilt.cab
InfFile=AsycFilt.inf
[MSVBVM50.DLL]
hook=MSVBVM50.cab_Installer
FileVersion=5,1,43,19
[MSVBVM50.cab_Installer]
file-win32-x86=http://activex.microsoft.com/controls/vb5/MSVBVM50.cab
InfFile=MSVBVM50.inf
[MDACFULL.EXE]
FileVersion=4,71,0819,0
Hook=MDAC
[MDAC]
file-win32-x86=http://yourwebserver/mdacfull.cab
run=%EXTRACT_DIR%\MDACFULL.exe /q
[Setup Hooks]
AddToRegHook=AddToRegHook
[AddToRegHook]
InfSection=DefaultInstall
[DefaultInstall]
AddReg=AddToRegistry
[AddToRegistry]
HKLM,"SOFTWARE\Classes\CLSID\{FD2B0C9D-E6B9-11D1-9BE7-
00C04FB9D91A}\Implemented Categories\{7DD95801-9882-11CF-9FA9-
00AA006C42C4}"
HKLM,"SOFTWARE\Classes\CLSID\{FD2B0C9D-E6B9-11D1-9BE7-
00C04FB9D91A}\Implemented Categories\{7DD95802-9882-11CF-9FA9-
00AA006C42C4}" CABARC n nameofyourcab.cab nameoftheocx.ocx nameoftheinf.inf-or-
CABARC n msftNexus.cab msftNexus.ocx msftNexus.infBe sure to include the correct, edited version of the .inf file.
<HTML>
<OBJECT ID="NexusCtl" WIDTH="381" HEIGHT="590"
CLASSID="CLSID:FD2B0C9D-E6B9-11D1-9BE7-00C04FB9D91A"
CODEBASE="msftNexus.CAB#version=1,0,0,0">
</OBJECT>
-or-
<OBJECT ID="NexusCtl" WIDTH="381" HEIGHT="590"
CLASSID="CLSID:FD2B0C9D-E6B9-11D1-9BE7-00C04FB9D91A"
CODEBASE="http://MyServer/MySecretCABDirectoty/
msftNexus.CAB#version=1,0,0,0">
</OBJECT>
<HEAD>
<TITLE>My Test Page</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML> http://www.verisign.com
This article is one of a series dealing with 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 in this Knowledge Base article. The whitepaper is located at the following URL:
http://www.microsoft.com/msdn/news/feature/datajul98/redistmdac.htmFor additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
Q167158 HOWTO: Package MFC Controls for Use Over the Internet
Q165075 HOWTO: Download Dependent DLLs in IE with .inf Files
Additional query words:
Keywords : kbMDAC kbDSupport
Version : WINDOWS:1.0,1.5; winnt:1.0,2.0
Platform : WINDOWS winnt
Issue type : kbhowto
Technology :
|
Last Reviewed: May 19, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |