Installing MDAC and DCOM with MSI
Since there is no merge module that installs MDAC and DCOM, Microsoft has created a
wrapper exe that will first install MDAC and DCOM, and then launch your msi setup. This is
documented in Microsoft Knowledge Base article Q257604.
If you prefer to integrate the MDAC and DCOM installation to your msi setup, this document
describes the required steps.
Overview
The algorithm of the install depends on whether you also want to create data sources
during your setup.
If no data sources need to be created:
- On Windows 95, install DCOM95 if not present, and reboot the computer (user choice, if
no reboot, quit the install for now).
- Install MDAC if not present, schedule a reboot after the install completed.
- Continue to install the application.
If data sources need to be created:
- On Windows 95, install DCOM95 if not present, and reboot the computer (user choice, if
no reboot, quit the install for now).
- Install MDAC if not present, and reboot the computer. (A reboot is require to complete
the MDAC installation, which must be done before you can create DSNs)
- Install application and data sources.
DCOM Installation
- By using the AppSearch create a property DCOMREGVERSION that holds the version nr of the
installed DCOM. If DCOM is not installed, the property is empty. The registry key
HKEY_CLASSES_ROOT\CLSID\{bdc67890-4fc0-11d0-a805-00aa006d2ea4}\InstalledVersion holds the
DCOM version number on Windows9X systems.
- Use a custom action to fill a property DCOM95 with the path to the DCOM.exe executable
on the installation CD-ROM. The action is only executed if we are running on Windows95 and
the DCOMREGVERSION property has not been filled (DCOM not installed)
- Use a custom action to execute DCOM.exe on the installation CD-ROM, using the DCOM95
property as the path. This action is only executed if the DCOM95 (previous step) has been
created.
- Use the ForceReboot action if the DCOM95 property is filled.
MDAC Installation
Note: Steps 1 and 2 are identical in both cases.
If no DSNs will be created:
- By using AppSearch create a property MDACREGVERSION that holds the version nr of the
installed MDAC. If MDAC is not installed, the property is empty. The registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\FullInstallVer holds the version number.
- Use a custom action to fill a property MDAC with the path to MDAC_TYP.exe on the
installation CD-ROM. The action is only executed if the MDACREGVERSION property contains a
version lower than 2.5 (the version that is being installed).
- Use a custom action to execute MDAC_TYP.exe on the installation CD-ROM, using the MDAC
property as the path. This action is only executed if the MDAC property has been created.
- Use ScheduleReboot to perform a reboot when the installation is completed.
If DSNs should be created:
- By using AppSearch create a property MDACREGVERSION that holds the version nr of the
installed MDAC. If MDAC is not installed, the property is empty. The registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\FullInstallVer holds the version number.
- Use a custom action to fill a property MDAC with the path to MDAC_TYP.exe on the
installation CD-ROM. The action is only executed if the MDACREGVERSION property contains a
version lower than 2.5 (the version that is being installed).
- Use a custom action to execute MDAC_TYP.exe on the installation CD-ROM, using the MDAC
property as the path. This action is only executed if the MDAC property has been created
and the DCOM95 property is FALSE.
- Use the ForceReboot action if the MDAC property is filled.
Detailed steps
a) In the Property manager, create the DCOM95 property and the MDAC property. Leave the
value blank. Do NOT create the DCOMREGVERSION or MDACREGVERSION properties.
b) In the Setup Design, create a feature. This feature will ensure that the
distribution files will be included in the CD-ROM distribution. Set the following
parameters:
Remote Installation: Favor Source
Display: Not Visible
c) In this feature, create a component for DCOM95 and one component for MDAC per
language that your install should support. In your source environment, rename all language
versions of MDAC to "mdac_typ.exe". (I.e. the Dutch MDAC is called
"mdac_typ_nl.exe). Place them all in a different directory. Let each component point
to is respective file, and set the appropriate language property.
d) Set the Source Location of the DCOM95 component to DCOM95. Set the source location
of each of the MDAC components to MDAC.
e) Create some custom actions:
DCOM95
Type 51
Source DCOM95
Target [SourceDir]program files\[ProductName]\DCOM95\DCOM95.exe
Comments This Action sets the DCOM95 property with the source directory of the exe,
assuming you have added DCOM95 as the source folder in the component
MDAC
Type 51
Source MDAC
Target [SourceDir]program files\[ProductName]\MDAC\mdac_typ.exe
Comments This Action sets the MDAC property with the source directory of the exe, assuming
you have added MDAC as the source folder in the component, and all language version have
the same executable name.
RUN_DCOM
Type 114
Source DCOM95
Target /R:N /Q:U
Comments Run the dcom95.exe using the source specified in the DCOM95 property /R:N = no
reboot /Q:U = no questions asked
RUN_MDAC
Type 114
Source MDAC
Target /q /C:"setup /QNT"
Comments Run the MDAC.exe, location is in the MDAC property. /q = no questions asked,
/C:"setup /QNT" is no reboot
f) Use the AppSearch action to find the release levels.
Use the Power Editor resp. Direct Editor (under Tools or Advanced Views) and fill the
AppSearch table:
| Property |
Signature_ |
| DCOMREGVERSION |
DCOMSIG |
| MDACREGVERSION |
MDACSIG |
Fill the RegLocator table
| Signature_ |
Root |
Key |
Name |
Type |
| DCOMSIG |
0 |
CLSID\{bdc67890-4fc0-11d0-a805-00aa006d2ea4}\InstalledVersion |
|
2 |
| MDACSIG |
2 |
SOFTWARE\Microsoft\DataAccess |
FullInstallVer |
2 |
g) Use the IDE Sequences to include the actions.
If no DSNs need to be created:
- If there is an APPS_TEST condition on the AppSearch action, remove the condition. Do
this both on the User Interface sequence and the Execute sequence.
- Insert the ResolveSource action, just after the InstalInitialize action in the Execute
Sequence. You need this to get the path to the source where DCOM.EXE and MDAC_TYP.EXE are
located. Give it a condition of Not Installed to avoid request for the installation CD
during uninstall.
- After the ResolveSource action, insert the following actions: DCOM95, MDAC, Run_DCOM95,
ForceReboot, Run_MDAC, ScheduleReboot
- The ForceReboot is to ensure a reboot after DCOM installation, the ScheduleReboot, is to
make sure we reboot at the end after installing MDAC
DCOM95
Condition = NOT Installed AND Version9X=400 AND NOT DCOMREGVERSION
MDAC
Condition = NOT Installed AND MDACREGVERSION < "2.5"
Run_DCOM
Condition = DCOM95
ForceReboot
Condition = DCOM95
Run_MDAC
Condition = MDAC
ScheduleReboot
Condition = MDAC
If you want to create DSNs:
- If there is an APPS_TEST condition on the AppSearch action, remove the condition. Do
this both on the User Interface sequence and the Execute sequence.
- Insert the ResolveSource action, just after the InstalInitialize action in the Execute
Sequence. You need this to get the path to the source where DCOM.EXE and MDAC_TYP.EXE are
located. Give it a condition of Not Installed to avoid request for the installation CD
during uninstall.
- After the ResolveSource action, insert the following actions: DCOM95, MDAC, Run_DCOM95,
Run_MDAC, ForceReboot
- The ForceReboot is to ensure a reboot after DCOM and MDAC installation
- The conditions on Run_MDAC make sure that in the first pass only the DCOM installer is
invoked, but the MDAC step is skipped. During the second pass DCOM is installed and
therefore the MDAC installer can run. We have to do it this way because you can't have two
ForceReboot actions in the same sequence.
DCOM95
Condition = NOT Installed AND Version9X=400 AND NOT DCOMREGVERSION
MDAC
Condition = NOT Installed AND MDACREGVERSION < "2.5"
Run_DCOM
Condition = DCOM95
Run_MDAC
Condition = MDAC AND NOT DCOM95
ForceReboot
Condition = DCOM95 OR MDAC
Remarks
Do not create the properties DCOM95, MDAC, DCOMREGVERSION, and MDACREGVERSION in the
Property manager. The installer engine will automatically create them if required.
In particular the ForceReboot is still not 100% the best solution. According to
Microsoft, the ForceReboot should be placed near the end of the install. As it is now, the
user has to do the option selection again. Fortunately, the chance of having to install
DCOM is very small, it seems to be present whenever a user has installed IE 4.0. But it
would be better if after reboot the selections are no longer needed. However, if I place
the ForceReboot at the end, Installed is true, so all conditions get messed up.
You may want to modify the condition on the InstallWelcome dialog in the
InstallUISequence (Installation - User Interface) to be:
Not Installed And Not PATCH And Not DCOM95 And Not MDAC
This will skip the wizard dialogs until DCOM and MDAC are installed properly. This way
users don't have to go through the wizard sequence repeatedly.
Is there a minimum level for DCOM needed? I now install MDAC 2.5, and as it is
described here, any DCOM is accepted. The lowest level of DCOM is 4,71,0,1120, which is
DCOM 1.x. With Windows 98, DCOM 1.2 was shipped, which is version 4,71,0,2612 (Microsoft
Q23200)
Witten by Pieter van Kampen, updated by Astrid Broecker and Stefan Krueger
|