views:

1890

answers:

3

How do I create a Setup And Deployment project that can run any number of times on a machine without requiring an uninstall?

I've created an installer to install a WCF service to an IIS directory. It does more than just xcopy, it asks the users questions to correctly setup web.config.

The problem is when it can only be installed once per server without requesting an uninstall.

"Another version of this product is already installed...."

Typically the service will have 10-15 separate instances per server (each instance pointing most likely to a separate database, or a different security context)

I can't figure out how to set up the installer to do this.

A: 

It sounds like your program has 2 parts rolled into 1 - an installer and 1 UI based update service. Could you separate the 2 and have the installer check for being already installed and if so, fire up the UI program to run config setup.

Mohit Chakraborty
I read his question as he wants to install the service 10-15 times on one machine - each with a different config.
HardCode
A: 

If you want to install multiple versions of the same application you must do 3 things:

  1. Ensure each version installs to a different folder, so subsequent installs will not overwrite previous ones. You do this by changing the DefaultLocation property of the Application Folder in the File System panel of the deployment project. A good policy it to use the application version as part of the location; e.g. [ProgramFilesFolder]\[Manufacturer]\[ProductName]\[ProductVersion].
  2. Ensure the ProductCode property of your deployment project is different, so subsequent installs will not uninstall the previous version. The easiest way to do that is to...
  3. Change the Version property of your deployment project. Visual Studio will ask if you want to change the ProductCode property; you do.
Dour High Arch
+1  A: 

Ok, I've got this working, I figured I'd answer it.

  1. I downloaded the Orca windows installer editing tool (Part of the Windows SDK)
  2. In the InstallExecuteSequence table, changed the following values to 0

    RegisterUser RegisterProduct PublishFeatures PublishProduct

This should allow the installer to run over and over without uninstalling.

Patrick Escarcega

related questions