Difficulties with Setup Project
-
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.
------------------------------- Carrier Bags - 21st Century Tumbleweed.
-
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.
------------------------------- Carrier Bags - 21st Century Tumbleweed.
On individual files in Setup projects there is a "Permanent" property that specifies whether or not a file is to be removed when an application is uninstalled, not sure if this helps you or not. If you're only looking to update some specific files perhaps you can create another setup project that does only that? To avoid prompting for an installation directory twice, write the path to the registry when the original program is initially installed using a custom installer action. Your update could pick it up from there, and know where to copy the updated files.
-
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.
------------------------------- Carrier Bags - 21st Century Tumbleweed.
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;
- DetectNewerInstalledVersion = true
- 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 at first you don't succeed ... post it on The Code Project and Pray.