Setup should remove existing version

Setup should remove existing version

am 27.01.2008 11:12:01 von GudniGSigurdsson

Hi.
I have written a .NET C# program and have also made a setup project for it.
Everything works fine, except that I would like my setup application to
remove any existing version of my program before proceeding with the setup.
This is because I get the following message if there is a previous version of
my program installed:

'Another version of this product is already installed. Installation of this
version cannot continue. To configure or remove the existing version of this
product, use Add/Remove Programs on the Control Panel.'

I would like to avoid having my user to use Add/Remove Programs on the
Control Panel. I would like my setup to silently remove any existing version
of my app and then proceeding with the installation of the new version.

Regards,
Gudni

RE: Setup should remove existing version

am 27.01.2008 20:56:00 von DavidAnton

On the project properties (via F4 - not the context menu 'Properties' - I
know, this is not very intuitive), set 'RemovePreviousVersions' to true.
Also, whenever you create a new setup, increment the version number - you'll
get a message about updating some guid automatically - say yes to this also.
Once you've done this, you'll see that everything installs as you want it (no
idea why this wouldn't be the default...).

I've found it very odd that Microsoft makes it hard to get to these
properties on setup projects (and there are two different properties in 2005
- one via F4 and one via the context menu, and they're totally different
dialogs...).
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++ VB Edition: VB to C++/CLI
Instant C++ C# Edition: C# to C++/CLI


"Gudni G. Sigurdsson" wrote:

> Hi.
> I have written a .NET C# program and have also made a setup project for it.
> Everything works fine, except that I would like my setup application to
> remove any existing version of my program before proceeding with the setup.
> This is because I get the following message if there is a previous version of
> my program installed:
>
> 'Another version of this product is already installed. Installation of this
> version cannot continue. To configure or remove the existing version of this
> product, use Add/Remove Programs on the Control Panel.'
>
> I would like to avoid having my user to use Add/Remove Programs on the
> Control Panel. I would like my setup to silently remove any existing version
> of my app and then proceeding with the installation of the new version.
>
> Regards,
> Gudni