Solved

Create an installer with VS.Net that replaces/unistalls existing versions

Posted on 2007-03-21
1
249 Views
Last Modified: 2013-11-26
Hi all,

I need to create an installer/setup project with VS.Net that will overwrite, update or uninstall any existing versions.  

I've set the property RemovePreviousVersions to true but if the installed version is different than the version I'm installing I get a popup saying "Another version is installed.  Installation cannot proceed etc etc".
0
Comment
Question by:alexatsearidge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
igor_alpha earned 500 total points
ID: 18769334
Hi, alexatsearidge!
Your problem cannot be solved by using VS setup project properties and installer class. It's because custom action will start after version validating.
It's not enough to just set RemovePreviousVersions Property to true.
1. You need to set RemovePreviousVersions Property to true.
It specifies whether an installer will remove previous versions of an application during installation. If this property is set to True and an earlier version is detected at installation time, the previous version's uninstall function will be called.
2. The installer checks UpgradeCode and ProductCode properties to determine whether the earlier version should be removed. The UpgradeCode must be the same for both versions, the ProductCode must be different.

So, on new version of app when preparing setup you just changing setup version and product code, leaving UpgradeCode same. The old app would be overwrited with new version.
0

Featured Post

Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question