views:

619

answers:

2

Hi Guys,

I need a little help on this subject.

I have a Web application written in ASP.NET plus I have the .bak file of the SQL Express database, my question is: How can I install this in a simple click and go way in the client?

how can I write a script that will create a new database, restore the bak file into that database, set up IIS and ... well, that's it :)

I do this all manually, and I do this a lot, so I was just asking if there is a way to prevent do all this steps manually.

Thanks.

+2  A: 

You could use WiX to create a .msi that you can use to install your application at your clients. WiX takes a bit to get used to, but once you get the hang of it, you'll meet your needs above, and be able to extend them as your application grows or increases in complexity from the installation point of view.

I read your question to mean you have several clients where you install your application, if that is not the case, and your app exists in one place, there are better solutions, and better people to give them to you!

JasonS
http://www.tramontana.co.hu/wix/ tutorial link
CheGueVerra
I will need to have a go, at least read the documentation :)
balexandre
+1  A: 

While WIX is certainly very flexible if you aren't comfortable with the learning curve (and there is a bit of a learning curve IMO) then perhaps you should check out the Web Deployment Projects.

From the blog post:

Web Deployment projects can be used with either the "ASP.NET Web Site" or "ASP.NET Web Application Project" options built-into VS 2008, and provide a few additional build, packaging and deployment options for you to use.

Regarding the database, I'd suggest that you utilise the App_Data directory and just deploy the ".mdf" file. This would be easier than trying to create a new database and restoring a backup.

Aydsman