?
Solved

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

Posted on 2007-03-21
1
Medium Priority
?
253 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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.
Suggested Courses

770 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