Installation deployment under .NET

xiaoxiao2021-03-05  29

Any Visual Basic or Visual C # app containing data access has a Microsoft Data Access Component (MDAC) version 2.7 or higher dependency. You must install MDAC on the target computer before installing your application, otherwise the application will fail.

For any application that contains a dependency of MDAC, you need to add a start condition to the application's deployment project to check if there is a correct version of MDAC, if not, stop the installation and warn the user.

Pay attention to add

Another way to start conditions is to include MDAC merge modules into your deployment project to automatically install MDAC when needed. The MDAC's merge module is not included in Visual Studio .NET; however, the module may be available on the Microsoft Web site in the future.

Add a start condition for MDAC

Select a deployment project in the Solution Explorer. On the View menu, select Editor and select Start Condition. Select the "Requirements on the Target" node. On the Actions menu, select Add Registry Start Condition. Select the "Search REGISTRYENTRY1" node. In the Properties window, select the RegKey property and enter Software / Microsoft / DataAccess. Select the root attribute and enter vsdrhklm. Select the value attribute and enter FullinstallVer. Select the Property property and enter MDACSearch. In the Start-up condition editor, select the "Condition1" node. In the Properties window, select the condition attribute and enter MDAcSearch> = "2.7". Select the Message property and enter: Before installing this application, you must install MDAC 2.7 or higher. MDAC can be installed from the Microsoft Web site http://www.microsoft.com/china.

Note You may want to modify this text to accommodate your specific situation, for example, you can point to the network sharing where MDAC is located.

转载请注明原文地址:https://www.9cbs.com/read-33961.html

New Post(0)