Solved

How to make this happen in setup project?

Posted on 2008-06-22
8
861 Views
Last Modified: 2013-11-13
Hi,

I have a c# windows application project to be released. a setup project has been done for this and the msi file works correctly. The only thing pending is: If I reinstall the application over existing installation, I want to see a warning message to remind uninstallation the existing one first.

How to do this in setup project? I am using setup project in visual studio 2005

thanks
0
Comment
Question by:viola123
[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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 16

Assisted Solution

by:MikeMCSD
MikeMCSD earned 50 total points
ID: 21843172
>> If I reinstall the application over existing installation, I want to see a warning message to remind uninstallation the existing one first.

If you change the release/revision number (in project properties) the new one will
automatically overwrite the old one, so you don't need to do this.
0
 
LVL 40

Assisted Solution

by:Vadim Rapp
Vadim Rapp earned 150 total points
ID: 21843212
>  If I reinstall the application over existing installation

please clarify what is "existing installation".  Same product, previous version? or same version?
0
 
LVL 6

Author Comment

by:viola123
ID: 21843301
hi, vadimrapp1:

"existing installation" means previous version

thx
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 6

Author Comment

by:viola123
ID: 21843304
hi, MikeMCSD:

I want to avoid automatically overwriting, this is why I have to check this.

thx
0
 
LVL 4

Accepted Solution

by:
cavehop earned 300 total points
ID: 21843895
The trick is to check the undocumented public property PREVIOUSVERSIONSINSTALLED. Probably what you will need to do is create a custom action whose "Condition" property is set to PREVIOUSVERSIONSINSTALLED. This way, if this value is True, the custom action will run. In the custom action, simply prompt the user with an appropriate message and return the code to cancel installation if necessary.

Note: Just FYI, this property is created by Visual Studio not my MSI.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 21849131
Instead of the custom action, you can add Launch Condition:

NOT PREVIOUSVERSIONSINSTALLED

and appropriate message.



Also, in setup project properties, you have to specify RemovePreviousVersions=True, otherwise PREVIOUSVERSIONSINSTALLED property is not created.
0
 
LVL 4

Expert Comment

by:cavehop
ID: 21849386
vadimrapp1,

I thought about using the Launch condition also, but the problem with that is that I think it will not prompt the user to decide whether or not to continue with the install. It will simply say something like, "Sorry, no installing for you."

Good catch with making sure the RemovePreviousVersions = True. I completely forgot about that.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 21849531
> I think it will not prompt the user to decide whether or not to continue with the install. It will simply say something like, "Sorry, no installing for you."

Right.

I suggest that you learn best practices with major, minor, and small upgrades, for example here:
http://msdn.microsoft.com/en-us/library/aa370579.aspx
http://helpnet.acresso.com/robo/projects/installshield12helplib/MajorMinorSmall.htm

You probably have to consider the possibility that the user won't uninstall old version, but install the new one into the same directory :-(
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 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