How do I create an installer for a .Net website, Windows Service, and more?
-
02-07-2019 - |
Question
I need to create an installer program that will do install the following:
- ASP.Net Website
- Windows Service
- SQL Express if it isn't installed and the user doesn't have a SQL Server
- Dundas Charts
- ASP.Net AJAX v.1.0
- ReportViewer control (for 2.0 Framework)
- Check Framework prerequisites (2.0)
- Configure IIS and app.config (data connection strings, etc.)
Is it realistic to be able to do this with a VS Setup Project? Or, should I be looking at other install tools?
Solution
You can use WiX
OTHER TIPS
Most of the best open source tools and programs for Windows are distributed using NSIS
ASP.Net Website ( no listing - bug in stackoverflow - code not formatting while list above .. )
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
- SQL Express if it isn't installed and the user doesn't have a SQL Server
- Dundas Charts - call silent installer
- ASP.Net AJAX v.1.0 - call silent installer
- ReportViewer control (for 2.0 Framework)
- Check Framework prerequisites (2.0) - check NSIS system func
- 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
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.
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 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.