[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Has anyone used .NET to detect previous installations and allow the users to decide if they would like to upgrade?

Posted on 2004-10-04
4
Medium Priority
?
199 Views
Last Modified: 2009-05-29
I have a .NET deployment project in which I would like to give the users the option to upgrade if a previous version of the project is detected.  Here is the problem at hand:

A .NET deployment project allows a developer to set the RemovePreviousVersions property in an install package, which (when set to True) automatically uninstalls a previous version prior to installing the current version.  When set to False, the user is presented with a message box stating that an existing version of the application is installed, and the install exits.

How can/does one add a dialog box to the deployment project which:
a) only shows up if a previous version is detected
b) allows the user to upgrade (i.e., remove the previous version) or exit the install

Any information on how to set this up will be most appreciated!

Thanks a bunch!
0
Comment
Question by:dangerwill
[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
  • 2
4 Comments
 
LVL 9

Expert Comment

by:glsac
ID: 12218953
I did this in VB :) Do you need it in .NET?
0
 

Author Comment

by:dangerwill
ID: 12218981
Yes.  This is a .NET install only, and the wrapper is .NET.  If the developers would use Installshield or Wise, this would be easily accomplished.  We know we can place a dialog box in, the problem is how to set it up conditionally during the installation and tweak it from there.

Thanks!
0
 
LVL 16

Accepted Solution

by:
RobertRFreeman earned 2000 total points
ID: 12222137
That's a tough one.  I don't think there is a priorVersionExists property available for a conditional command.  It looks as if it's all or nothing with the RemovePreviousVersion property.

If you need to do this, you could check for existing files in the install directory or check for existing entries in the registry (better).
When deploying, copy the msi file to the deployment directory.
Then if you find the entry in the registry or the msi file in the directory, you would prompt the user, then run a custom action to uninstall the prior version.  (Use the setup.msi /x command).
0
 
LVL 16

Expert Comment

by:RobertRFreeman
ID: 12222453
Should be setup.exe /x /qb instead of setup.msi.  (You will need the setup.exe file as well in your install directory for this.)
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

649 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