all groups > visual studio .net setup > may 2007 >
You're in the

visual studio .net setup

group:

Trouble with VS 2005 Installer and Add\Remove Program entries


Trouble with VS 2005 Installer and Add\Remove Program entries DatabaseOgre
5/1/2007 8:55:01 AM
visual studio .net setup:
We have a web setup project in MS 2005. When our users run it on their server
the first time, it creates folders and files necessary for our web app to run
on their server. After which, the user manually assigns some required shares
on the newly created folders, along with some other IIS settings.

Our issue is when we create an update with a newer version number, even
though it correctly updates the files, it also creates an identical listing
in “Add/Remove Programs”, which we obviously don’t want. However, we don’t
want to uninstall the previous version because this removes the originally
created folders. That’s not typically a problem, but in this case, it means
the user has to recreate the shares on the newly created folders, just as
they did before. We want to avoid this.

So our question is, how can we have our web setup install over the existing
files, without having to uninstall the previous version and not have it list
the same setup name in “Add/Remove Programs”?

We assume we could somehow make our setup create the shares on the newly
reated folders via a shelled program (and do the other IIS settings) but
because of complexity and time, we were hoping a few setup tweaks could
resolve this issue. All other setup packages I’ve worked with simply replace
the existing entries in “Add/Remove Programs” whenever an update is made
(without having to uninstall the previous version) so it seems it should be
easy, but we’re not finding it.

Regards,

Re: Trouble with VS 2005 Installer and Add\Remove Program entries Phil Wilson
5/2/2007 8:13:43 AM
You can't really get there with Visual Studio setups. Its supported update
mechanism is RemovePreviousVersions, which uninstalls the previous version
of the product. When you don't use that you'll get two versions of the
product in ARP.
It's dangerous to replace files from the first onstall with another setup
because that first MSI setup can go into repair mode and restore them. So
getting RemovePreviousVersions to work will get you an updated product
installed, and the new setup could create those shares with a custom action.

I don't know how many files you need to update, but when all you're changing
is a few files (and not deleting anything) a patch (a .msp file) is how MSI
products are updated, but Visual Studio has no IDE support for that.
Updating an MSI product has rules - it's not just copying files around.

I've lost track of the number of times I've advised people to make sure they
know how to update a product *before* they ship it.
--
Phil Wilson
[Microsoft MVP-Windows Installer]

[quoted text, click to view]

Re: Trouble with VS 2005 Installer and Add\Remove Program entries DatabaseOgre
5/2/2007 1:04:01 PM
Thanks for your response, which leads to another question. We’re considering
simply having multiple listing in the ARP. However, you said, “It's dangerous
to replace files from the first install with another setup because that first
MSI setup can go into repair mode and restore them.” My question is, can
occur on its own, without the user choosing to run the setup in repair mode?
And without the first install’s setup.exe file present on the machine?
--
Regards,

DatabaseOgre


[quoted text, click to view]
Re: Trouble with VS 2005 Installer and Add\Remove Program entries Phil Wilson
5/2/2007 2:02:00 PM
A repair can be triggered by a number of things - shortcuts, COM activation
are a couple. I don't think I'd bet my business on one not occurring. If it
goes into repair mode and requires the original MSI file to restore files
there'll be a message box asking for you to browse to the source MSI file if
it can't locate it at the original install location.
--
Phil Wilson
[Microsoft MVP Windows Installer]
[quoted text, click to view]

AddThis Social Bookmark Button