Hi,
If you want to keep the old files of your first version which are not present in the new version of your application you can check the "Do not overwrite existing file" option.
However, this option works only if you have access to the first version of the setup project (i.e. you did not released its build yet).
You can check this article:
How do I prevent a file or registry entry from being uninstalled or repaired?
Here is what you should try in your first version of your project:
- Go to the "Files and Folders" page.
- Right click on the file you want to keep and select "Properties".
- Go to the "Operations" tab and enable the "Do not overwrite existing file" option with the "Condition" field set to 1; this means that the file on disk will be always preserved when present.
If you cannot modify anymore the first version of your setup project, in your new version of your project, you can right click on your folder from the
"Files and Folders" page, select
"Properties" and then
"Operations" tab. Here you can set
"Do not overwrite existing files" with the condition field set to
"OLDPRODUCTS". However, this will save all files present in the folder and will not overwrite any of them.
Also, as another solution you can try to backup the old files on the new version of your project and restore them at the end of the installation. To do that please have a look on our article:
How To Backup and Restore Files during a Major Upgrade
Hope this helps! If you have any other questions, please don't hesitate to contact us.
Best regards,
Liviu