Solved

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

Posted on 2007-03-21
1
238 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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

763 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

11 Experts available now in Live!

Get 1:1 Help Now