Solved

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

Posted on 2007-03-21
1
242 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Different Delete Messages 7 37
What are the Important skill to have as Asp.net Developer 8 43
Make all values in arrayist to titlecase+vb.net 23 27
how to read json value 2 30
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now