Solved

How to make this happen in setup project?

Posted on 2008-06-22
8
855 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 remove error in database 6 55
Migrating from Exchange 2010 to 2013 2 70
GUID's in SQL Server 4 31
SSIS - Using VB.NET to parse XML file 11 40
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

732 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