Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setup - MDAC installs when not needed 1

Status
Not open for further replies.

jubble

Programmer
Mar 6, 2002
207
GB
I am creating a setup and deployment project that needs to include the .Net Framework in the installation.

I have followed Microsoft's steps for installing the Bootstrapper plugin and everything installs fine...

EXCEPT...I also want to install MDAC. Microsft give instructions for also installing MDAC with a deployment project but the computer I am installing on still installs MDAC 2.7 whether it exists on the machine or not.

The instructions Microsft gave are...

ref: (
To install MDAC with a Setup project

1-Make sure that the Visual Studio .NET Framework Bootstrapper Plug-in is installed.
2-Select the Setup project in Solution Explorer. From the View menu, point to Editor and choose Launch Conditions.
3-Select the Requirements on Target Machine node. From the Action menu, choose Add Registry Launch Condition.
4-Select the Search for RegistryEntry1 node. In the Properties window, select the RegKey property and type Software\Microsoft\DataAccess.
5-Select the Root property and select vsdrrHKLM.
6-Select the Value property and type FullInstallVer.
7-Select the Property property and type MDACSEARCH.
***8-In the Launch Conditions Editor, select the Condition1 node. In the Properties window, select the Condition property and select MDACSEARCH>="2.6". ***
9-Select the Setup project in Solution Explorer. On the Project menu, choose Properties.
10-Set the Bootstrapper property to Windows Installer Bootstrapper.


I'm just wondering if that should be MDAC<="2.7" or this the correct behaviour on the machine installing the application?
 
Correction on above post

MDAC<"2.7" would probably make more sense than MDAC<="2.7
 
I'm not sure that your conditional should be placed in the launch conditions but then I'm not familiar with VS.NET terminology. I work with Orca to edit the msi database directly and have the following:

RegLocator Table:
MDAC 2 Software\Microsoft\DataAccess FullInstallVer 2

Property Table:
MDACVERSION 0

ModuleInstallExecuteSequence Table (This may just be InstallExecuteSequence cause I authored mine as a merge module)
InstallInitialize 1500
InstallMDAC InstallInitialize 1 MDACVERSION < "2.70.9001.0" And Not REMOVE="ALL"

AppSearch Table
MDACVERSION MDAC

CustomAction Table
InstallMDAC 66 MDAC_Typ /c:"dasetup /q /n"

and the redistributable is in the Binary table under the key MDAC_Typ.

You are running a custom action during the installation according to the conditional MDACVERSION < "2.70.9001.0" And Not REMOVE="ALL" You may want to include the REMOVE="ALL" clause to prevent this from running when the user uninstalls.

My best guess from where you are coming from with VS.NET is that your property, MDAC, is not included in the property table. If I remember correctly, its sort of like declaring a variable, you have to have any property used in the installer present in the property table.

You might want to try nosing around with Orca. It is part of the Windows Installer SDK and will allow you to see the output of your VS.NET project. Its also great for looking at other installations on your computer if you want to reverse engineer someone else's installer.
 
I think I'm barking up the wrong tree with launch conditions being the result of MDAC being installed. It looks as though the launch condition will prevent my app from installing if MDAC 2.7 doesn't exist but doesn't play any part in installing MDAC. The installation of MDAC seems to be done before the launch conditions are consulted.

Which is I guess where Orca comes in...there goes the early night that was planned.

Thanks for the leads.
 
Here is an url that has a merge module for MDAC 2.6 and 2.7:
Just look for the MDAC section, user created merge modules.

This might save you the learning curve if the behavior meets your needs. Even if it doesn't, it beats having to start from scratch as you may be able to tweak it to your particular needs with Orca.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top