views:

728

answers:

2

Let's say that you have a product that is written in Visual Studio and you provide your customers and users with an installer for that product.

Then, you have some minor changes that you want to deploy to your users; you don't want your users to have to go through an uninstall process, backing up the configuration and then reinstalling the product again and restoring the configuration.

Instead, you want to provide a "hot-fix" that the users can simply copy over the already installed product. Using Visual Studio or some Microsoft tools, how would you go about this?

I don't know if it matters, but lets say that the product is 1) partially a web application, 2) partially a windows service and 3) partially a windows application.

+2  A: 

Use WiX.

It can deal with all those things (installation web applications, services, etc), and it's very flexible, free, and it's what Microsoft uses to build their installers.

You can install Votive to work with WiX inside of Visual Studio.

The details of how to do exactly what you're asking is a bit complex, and depends on the specifics of the situation. In general, you need to build your initial MSI to have an upgrade code. Then, subsequent upgrade installers will use the same product code and upgrade code, but change the version. You can read the details of how to do this with WiX as part 4 of the tutorial.

IF you have existing installs, they may or may not have an upgrade code already set. You can find out by examining them using ORCA (MSDN how to here).

This can also be done via the .Net Setup projects built into Visual Studio, but I advise against that. They are not as flexible as WiX. If you care about your installation, and have something as complicated as what you're describing to install, WiX is the best way to go.

Troy Howard
A: 

You can create deployment projects that can handle this in Visual Studio. These result in an MSI (or potentially multiple MSIs) that can be run on client machines or servers and perform the upgrade.

Guy Starbuck