DISABLE ADBLOCK

ADBlock is blocking some content on the site

ADBlock errore
Results found: 

Question

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.

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.

If you like, leave us your opinion

Was the article helpful and is it translated correctly?

Licensed under: CC-BY-SA with attribution
Not affiliated with CodeProject