views:

329

answers:

1

I need to learn more about creating setup projects from within Visual Studio to support the following scenario: When the user starts the setup, he needs to choose between the parts that he wants to set up. The setup should offer to install three web services, one web site and maybe even run some SQL scripts to install/update the database.

During installation, the user will need to tell where he wants the sites/services to be installed within IIS. He also needs to specify the database connection which is used within the services/sites and to update the database. And there will probably be a few other wishes too. It should also support an uninstall of the site and services, but the database can continue to exist.

Is this even possible with the Setup projects that Visual Studio creates? If not, no worries. I don't need an alternative solution! I just need to know if this is possible before trying myself and discovering it's not possible after weeks of trying... This is for an internal project and I want to make life easier for the administrators who need to install/upgrade these sites/ services every time when there's an update. (About once every two weeks.)

+4  A: 

Stay well away from vdproj stuff and move to WiX ASAP (As you'll see me being advised in questions I asked here). For a start, flexibility around where to put the IIS apps is seriously limited (you get one virtual dir and the user can only choose the name, you cant have multiple instances).

The other side of this is of course that the vdproj stuff is an 80% solution. Ultimately you can add as many custom steps as you like, and they can pop up dialogs and whatever they like. There's no reason why a custom step cant do all the things you want.

I just know that I once thought like you, and looking back wish someone had grabbed me by the scruff of the neck and said, just use the proper stuff - even if it seems a little harder initially. There is a conversion tool that will suck in your vdproj and spit you out a WiX.

By all means, try wizarding up what you need and seeing if it works - most of the stuff is pretty searchable - just know when to call it quits.

Ruben Bartelink
+1 for doing the right thing. The fact that WiX is used by Microsoft to create the Visual Studio Setup speaks for itself.
OregonGhost
Well, just as I suspected then. The vdproj is just not good enough to use for these kinds of things. :-) Thanks, you've saved me a lot of time experimenting.
Workshop Alex
@OregonGhost: Yes, gotta love the efficiency of the SP installers for VS :P (Yes, I know what you mean). @Workshop Alex: One more thing is that if you ever want to create an installer as part of an automated build, Visual Studio would have to be installed on the build [agent] machine (IANAL but I think from a licensing perspective that's OK, but from a PITA poerspective it's not on)
Ruben Bartelink
Well, we have a build system that is used for products we create for third parties. But this project is just meant as an internal project. Unfortunately, the many setups and SQL scripts are a bit too confusing for our administrator.
Workshop Alex
I'd guessed that. But as the world moves towards CI, you might eventually get to the stage where even a 'little internal tool' becomes easy to automate the build for - and in that case the less requirements on heavy installs the better - WiX is becoming a standard install on the build agent too :- http://blogs.msdn.com/jimlamb/archive/2008/11/03/integrating-dependencies-into-team-build-2010.aspx
Ruben Bartelink