我爱Aspx >> Asp.Net >> .net打包自动安装数据库使用 Setup 项目安装 MDAC
1.确保 Visual Studio .NET 框架引导程序插件已安装。
2.在 Solution Explorer 中选择 Setup 项目。
从 View 菜单指向 Editor,并选择 Launch Conditions(启动条件)。
3.选择 Requirements on Target Machine(搜索目标计算机) 节点。
从 Action 菜单,选择 Add Registry Launch Condition(添加注册表搜索)。
4.选择 Search for RegistryEntry1 节点。在 Properties 窗口中,
选择 RegKey 属性,并键入 Software\Microsoft\DataAccess。
5.选择 Root 属性,并选择 vsdrrHKLM。
6.选择 Value 属性,并键入 FullInstallVer。
7.选择 Property 属性,并键入 MDACSEARCH。
8.在 Launch Conditions Editor(启动条件) 中,添加Condition1 节点。
选择 Condition1 节点,在 Properties 窗口中,选择 Condition 属性,并选择 MDACSEARCH>="2.6"。
9.在 Solution Explorer 中选择 Setup 项目。在 Project 菜单上,选择 Properties。
10.将 Bootstrapper 属性设置为 Windows Installer Bootstrapper(Windows 安装引导程序)。
附:
installdb.vb类,要添加引用 system.configuration.install.dll :
Imports System.ComponentModel
Imports System.Configuration.Install
<RunInstaller(True)> Public Class Installer1
Inherits System.Configuration.Install.Installer
#Region " 组件设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是组件设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'Installer 重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
Ҷƪл˵?
数据分页显示方案[04-21]
ASP.NET 2.0 正式版中无刷新页面..[04-21]
Ajax在.NET中与Server控件的交互[04-21]
体验ASP.NET 2.0新特性[04-21]
FCKeditor.net[04-21]
初学asp.net应该记住的东西[04-21]
从COM组件调用.NET组件编程实战[04-21]
缓存 ASP.NET 页的某些部分[04-21]
c#教程第一讲 开始.net探索之旅[04-21]
.net课件之多线程[04-21]
解读C#中的规则表达式(正则表达..[04-21]
C#中的特性(Attributes)[04-21]
几个C#写的网络相关开源组件[04-21]
多个页面向同一目标页面PostBack..[04-21]
常用SQL书写技巧[04-21]
常用CHM帮助文档集锦下载[04-21]
数据分页显示方案[04-21]
ASP.NET 2.0 正式版中无刷新页面..[04-21]
c#学习体会:使用 ref 和 out 传递..[04-21]
c#中使用ref和out一点认识[04-21]