Solved

How to make this happen in setup project?

Posted on 2008-06-22
8
814 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
  • 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
 
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
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.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

20 Experts available now in Live!

Get 1:1 Help Now