Wim ten Brink
Wim ten Brink

Reputation: 26692

Using Visual Studio to create a more complex setup project

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.)

Upvotes: 1

Views: 656

Answers (1)

Ruben Bartelink
Ruben Bartelink

Reputation: 61903

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.

Upvotes: 4

Related Questions