Solved

How to make this happen in setup project?

Posted on 2008-06-22
8
847 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to read text with RegEx... 2 26
FInd Image Control Gridview 3 23
Code works but breaks when I add one section 4 21
VB.NET Application Installation with sqlserver 8 32
One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

821 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