Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > .NET > C#.NET > 在.Net安装文件中包含.Net Framework和MDAC 2.7
【标  题】:在.Net安装文件中包含.Net Framework和MDAC 2.7
【关键字】:.Net,.Net,Framework,MDAC,2.7
【来  源】:http://blog.csdn.net/acsu/archive/2006/12/05/1431179.aspx

在.Net安装文件中包含.Net Framework和MDAC 2.7

Your Ad Here
这里下载“Microsoft Visual Studio .NET 2003 引导程序插件”。

通过 Microsoft Visual Studio .NET 2003 引导程序插件,您可以轻而易举地创建安装程序,将 .NET Framework 1.1 和/或 MDAC 2.7 随您的应用程序一起重新分发。
为使 .NET Framework 应用程序可以在某台特定的计算机上运行,该计算机上必须安装有 .NET Framework。 任何使用 ADO.NET 来连接数据库的 .NET Framework 应用程序都要求使用 MDAC 2.7。 许多计算机都已经安装了这些组件,但是,为了确保某个应用程序能够运行,应随该应用程序重新分发这些组件。
Visual Studio .NET 2003 引导程序与 Visual Studio .NET 安装程序和部署项目集成在一起。 基于这一点,您可以只创建一个安装程序,用它来自动检测目标计算机上是否存在那些系统必备软件,并根据需要进行安装。 如果在安装任何组件的过程中要求计算机重新启动,安装程序将会自动继续后续的安装操作。 因此,应用程序的用户只需要运行一个安装程序即可安装系统必备软件和相应的应用程序。
若要了解有关 Visual Studio .NET 2003 引导程序的更多内容,请参阅《.NET Framework 1.1 开发指南》中的 Visusal Studio .NET 2003 文章

部分内容节选:

Setup projects in Visual Studio .NET 2003 can be used to install the .NET Framework with your application, but only if you have installed the optional Visual Studio .NET Framework Bootstrapper Plug-in on your development computer.

Note   The Visual Studio .NET Framework Bootstrapper Plug-in is available for download from the Download Center.

The Visual Studio .NET Framework Bootstrapper Plug-in modifies the behavior of the Setup project's Bootstrapper property to include the .NET Framework bootstrapper as well as the Windows Installer bootstrapper. The .NET Framework redistributable and the appropriate Language pack are then packaged with your application; a launch condition checks for the correct version of the .NET Framework at install time and if necessary, installs it before installing your application.

Note   The Visual Studio .NET Framework Bootstrapper Plug-in doesn't modify the Web bootstrapper. Setting the Bootstrapper property to Web Bootstrapper will only install the Windows Installer Bootstrapper.

In addition, if your application requires data access, you can install the Microsoft Data Access Components (MDAC) with your setup.

The Visual Studio .NET Framework Bootstrapper Plug-in also supports installing localized versions of the .NET Framework for each of the eight languages supported by Visual Studio .NET. You must install a separate version of the plug-in for each language that you wish to support; these can be downloaded from the same location as the English version. The Localization property of the Setup project determines which version of the framework will be bootstrapped. For more information, see Installing Localized Applications.

To make sure that the plug-in is installed

  1. From the Control Panel, click on Add or Remove Programs.
  2. In the Add or Remove Programs dialog box, check the Currently installed programs list for Microsoft Visual Studio .NET 2003 Bootstrapper Plug-in.

If Microsoft Visual Studio .NET 2003 Bootstrapper Plug-in is not listed, you will need to download and install the Visual Studio .NET Framework Bootstrapper Plug-in from the Download Center.

Note   You can also uninstall the Visual Studio .NET Framework Bootstrapper Plug-in by selecting it from the list and clicking Remove.

To install the .NET Framework 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. On the Project menu, choose Properties.
  3. Set the Bootstrapper property to Windows Installer Bootstrapper.

    The .NET Framework redistributable will be packaged with the Setup.exe for the Setup project when it is built.

    Note   The .NET Framework launch condition must also be enabled; it is enabled by default for any project that references the .NET Framework. To check for the launch condition, from the View menu, point to Editor and choose Launch Conditions, then look for a launch condition named .Net Framework.

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". (注:应该是前面少了一个步骤,把Search for RegistryEntry1 node的Property 的值修改成MDACSEARCH>="2.6",不过我修改成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.

    Both the .NET Framework redistributable and MDAC will be packaged with the Setup.exe for the Setup project when it is built.

 
一段检测当前进程是否已经在运行了的代码,非常实用!:【上一篇】
再论VS.NET中的安装部署文件:【下一篇】
【相关文章】
  • 基于.NET 2.0的GIS开源项目SharpMap分析手记(二):源代码总体结构分析
  • ASP.NET 2.0入门经典(第4版) - Web站点常见任务的简单解决方案
  • 在Asp.Net 2.0中使用Css Tab Design样式美化菜单
  • 从小处看C#.net垃圾回收
  • 文章推荐:ASP.NET AJAX Under the Hood Secrets及其他
  • 基于.NET的CMS软件的选择
  • 讲座展示:TechEd Europe DEV 411 - AJAX Patterns with ASP.NET AJAX(1)
  • PageFlakes.com创建者写的《ASP.NET AJAX 之内幕揭密》
  • Zend Framework:通过RewriteRouter写出漂亮的URL
  • Thinking in Current Paradigms, Platforms, Frameworks, and Libraries
  • 【随机文章】
  • Lucene中的基本概念
  • 电子商务的产生与发展
  • 3DS Max 7 Mental Ray渲染器全攻略:运动模糊
  • Authorware插入文本的四种方法
  • RangeValidator Web 控件
  • 2005-12-4 凌晨2点半 广州转冷我先知
  • FreeBSD 5.x下GDM的安装
  • 视频捕获笔记
  • 小小电池导致三块主板无法启动
  • 在C++Builder使用TTS(Text To Speech)
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.