Share via


How to: Add a Launch Condition for Microsoft Data Access Components

Any Visual Basic or Visual C# application that includes data access has a dependency on Microsoft Data Access Components (MDAC) version 2.8 or later. MDAC must be installed on a target computer prior to installing your application or the application will fail.

Note

MDAC is already installed on most operating systems except for Windows 2000 Service Pack 3 or earlier. The same procedure described in this topic can be used to check for the correct version of any dependent component.

For any application that has a dependency on a component such as MDAC, you can to add a launch condition to the application's deployment project that checks for the correct version of the component and, if not found, halts the installation and warns the user.

Note

An alternative to adding a launch condition is to use the bootstrapper to install prerequisite components on the target computer. For more information, see How to: Install Prerequisites in Windows Installer Deployment.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

To add a launch condition for MDAC

  1. Select the deployment project in Solution Explorer. On the View menu, point to Editor, and then click Launch Conditions.

  2. Select the Requirements on Target Machine node. On the Action menu, choose Add Registry Launch Condition.

  3. Select the Search for RegistryEntry1 node. In the Properties window, select the RegKey property and enter Software\Microsoft\DataAccess.

  4. Select the Root property and enter vsdrrHKLM.

  5. Select the Value property and enter FullInstallVer.

  6. Select the Property property and enter MDACSEARCH.

  7. In the Launch Conditions Editor, select the Condition1 node. In the Properties window, select the Condition property and enter MDACSEARCH>="2.8".

  8. Select the Message property and enter MDAC version 2.8 or higher must be installed prior to installing this application. You can install MDAC from the Microsoft Web site https://www.microsoft.com.

    Note

    You may want to modify this text for your particular situation — for example, you could point to a network share where MDAC is located.

See Also

Other Resources

Launch Condition Management in Deployment

Deploying Applications and Components