Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
4.33/5 (4 votes)
See more:
I'm trying to get my head around the mechanics of Install / Uninstall in the setup project. It seems to me that Installing a new project will uninstall the previous version completely, and install the new version.

This is a real pain as i only want to update the application, and would really like to do it without removing all the existing files that are installed, and without prompting the user to choose where to install the application again.

I can't figure out a way around this besides using an external install builder, and i'd really like to avoid that if possible.

Posted

1 solution

If I'm understanding you right, you are trying to get rid of the dialog that pops up telling the user to uninstall the existing version before installing this version.

If thats right, I had a similar problem not to long ago. The solution is simple just increment the version number on your installer and make sure the following properties are set on your Setup project;

  1. DetectNewerInstalledVersion = true

  2. RemovePreviousVersions = true



As far as the removing files that are in the directory, like Jack suggested, if you are installing the files and you want them to remain, flag them as Permanent. If the files are created from your app, such as backups or error logs, when you uninstall the application it will leave those files there by default.

 
Share this answer
 
Comments
Nanigarikapati 26-Sep-14 6:33am    
This will remove in control panel.but when i am running the app it shows the old output.
Adam R Harris 26-Sep-14 18:56pm    
I'm not quite sure what you are saying but I posted this over 5 years ago so somethings might haves changed since this post. It seems like English isn't your first language, which is fine, perhaps you could try expanding on your question/comment and I'll see if I can help out if it is actually a question
Nanigarikapati 29-Sep-14 2:46am    
Hi,
you are correct English isn't my first language.
I want a vs 2010 setup project to Remove completely previous versions when i install new version.

Thank you for your reply.
Adam R Harris 29-Sep-14 18:55pm    
So you want to force the user to completely uninstall the previous version before installing the updated version?
Nanigarikapati 1-Oct-14 2:49am    
No, When user install the upgrade version it hows a message "Already contain old version do u want to upgrade?" then user click the the 'Yes' it will automatically remove the old version and instal the new one.


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900