如何为.Net网站,Windows服务等创建安装程序?

时间:2022-03-28 07:11:54

I need to create an installer program that will do install the following:

我需要创建一个安装程序,它将安装以下内容:

  1. ASP.Net Website
  2. Windows Service
  3. SQL Express if it isn't installed and the user doesn't have a SQL Server
  4. SQL Express如果未安装且用户没有SQL Server

  5. Dundas Charts
  6. ASP.Net AJAX v.1.0
  7. ASP.Net AJAX v.1.0

  8. ReportViewer control (for 2.0 Framework)
  9. ReportViewer控件(适用于2.0 Framework)

  10. Check Framework prerequisites (2.0)
  11. 检查框架先决条件(2.0)

  12. Configure IIS and app.config (data connection strings, etc.)
  13. 配置IIS和app.config(数据连接字符串等)

Is it realistic to be able to do this with a VS Setup Project? Or, should I be looking at other install tools?

能够使用VS安装项目执行此操作是否现实?或者,我应该看看其他安装工具吗?

4 个解决方案

#1


6  

You can use WiX

您可以使用WiX

#2


4  

Most of the best open source tools and programs for Windows are distributed using NSIS

大多数用于Windows的最佳开源工具和程序都是使用NSIS进行分发的

ASP.Net Website ( no listing - bug in * - code not formatting while list above .. )

ASP.Net网站(没有列表 - *中的错误 - 代码没有格式化,而上面的列表..)

CreateDirectory $INSTDIR
SetOutPath $INSTDIR
; HERE UNZIP ACTUALLY THE FILES (ADD *.js files if needed ) 
; PACK ALL THE FILES EXCEPT THOSE WITH FILE EXTENSIONS after the /x
File /r /x *.suo /x *.MDF /x *.exclude /x *.ldf /x *.pl /x *.nsis /x *.cmd "siteFolderName\*.*"
  • Windows Service and here
  • Windows服务和这里

  • SQL Express if it isn't installed and the user doesn't have a SQL Server
  • SQL Express如果未安装且用户没有SQL Server

  • Dundas Charts - call silent installer
  • Dundas Charts - 呼叫静音安装程序

  • ASP.Net AJAX v.1.0 - call silent installer
  • ASP.Net AJAX v.1.0 - 调用静默安装程序

  • ReportViewer control (for 2.0 Framework)
  • ReportViewer控件(适用于2.0 Framework)

  • Check Framework prerequisites (2.0) - check NSIS system func
  • 检查框架先决条件(2.0) - 检查NSIS系统函数

  • Configure IIS and app.config (data connection strings, etc.) - I do this with preconfiguring the files in the installer and writing those during install time
  • 配置IIS和app.config(数据连接字符串等) - 我这样做是为了预配置安装程序中的文件并在安装时写入这些文件

#3


0  

I used WiX. I banged my head against the wall for a few days, then got the hang of it. The WiX mailing list is key if you have never worked with WiX before.

我用的是WiX。我把头撞在墙上几天,然后抓住了它。如果您之前从未使用过WiX,那么WiX邮件列表是关键。

#4


0  

As my previous speakers already sayed i also would recommend you to use WiX. Visual Studio (till version 2008) also has a proprietary built-in installer system. But i would avoid using it, because you need to use the full Visual Studio IDE to compile it. You cannot use command line build scripts, and therefore it is useless when working with a automated build server.

正如我之前的发言者已经说过我也会建议你使用WiX。 Visual Studio(直到2008版)还具有专有的内置安装程序系统。但我会避免使用它,因为你需要使用完整的Visual Studio IDE来编译它。您不能使用命令行构建脚本,因此在使用自动构建服务器时它是无用的。

WiX gives you all the flexibility you might need. And as far as i know, Microsoft will use it as standard installer tool in Visual Studio 2010.

WiX为您提供所需的所有灵活性。据我所知,Microsoft将在Visual Studio 2010中将其用作标准安装程序工具。

#1


6  

You can use WiX

您可以使用WiX

#2


4  

Most of the best open source tools and programs for Windows are distributed using NSIS

大多数用于Windows的最佳开源工具和程序都是使用NSIS进行分发的

ASP.Net Website ( no listing - bug in * - code not formatting while list above .. )

ASP.Net网站(没有列表 - *中的错误 - 代码没有格式化,而上面的列表..)

CreateDirectory $INSTDIR
SetOutPath $INSTDIR
; HERE UNZIP ACTUALLY THE FILES (ADD *.js files if needed ) 
; PACK ALL THE FILES EXCEPT THOSE WITH FILE EXTENSIONS after the /x
File /r /x *.suo /x *.MDF /x *.exclude /x *.ldf /x *.pl /x *.nsis /x *.cmd "siteFolderName\*.*"
  • Windows Service and here
  • Windows服务和这里

  • SQL Express if it isn't installed and the user doesn't have a SQL Server
  • SQL Express如果未安装且用户没有SQL Server

  • Dundas Charts - call silent installer
  • Dundas Charts - 呼叫静音安装程序

  • ASP.Net AJAX v.1.0 - call silent installer
  • ASP.Net AJAX v.1.0 - 调用静默安装程序

  • ReportViewer control (for 2.0 Framework)
  • ReportViewer控件(适用于2.0 Framework)

  • Check Framework prerequisites (2.0) - check NSIS system func
  • 检查框架先决条件(2.0) - 检查NSIS系统函数

  • Configure IIS and app.config (data connection strings, etc.) - I do this with preconfiguring the files in the installer and writing those during install time
  • 配置IIS和app.config(数据连接字符串等) - 我这样做是为了预配置安装程序中的文件并在安装时写入这些文件

#3


0  

I used WiX. I banged my head against the wall for a few days, then got the hang of it. The WiX mailing list is key if you have never worked with WiX before.

我用的是WiX。我把头撞在墙上几天,然后抓住了它。如果您之前从未使用过WiX,那么WiX邮件列表是关键。

#4


0  

As my previous speakers already sayed i also would recommend you to use WiX. Visual Studio (till version 2008) also has a proprietary built-in installer system. But i would avoid using it, because you need to use the full Visual Studio IDE to compile it. You cannot use command line build scripts, and therefore it is useless when working with a automated build server.

正如我之前的发言者已经说过我也会建议你使用WiX。 Visual Studio(直到2008版)还具有专有的内置安装程序系统。但我会避免使用它,因为你需要使用完整的Visual Studio IDE来编译它。您不能使用命令行构建脚本,因此在使用自动构建服务器时它是无用的。

WiX gives you all the flexibility you might need. And as far as i know, Microsoft will use it as standard installer tool in Visual Studio 2010.

WiX为您提供所需的所有灵活性。据我所知,Microsoft将在Visual Studio 2010中将其用作标准安装程序工具。