m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Keep old files that are not part of installer

Fri Aug 20, 2021 3:49 pm

I want to keep old files (that are not part of the installer) when silent updating. Is it possible?

Thanks

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Keep old files that are not part of installer

Mon Aug 23, 2021 1:46 pm

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:
  1. Go to the "Files and Folders" page.
  2. Right click on the file you want to keep and select "Properties".
  3. 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
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Re: Keep old files that are not part of installer

Fri Aug 27, 2021 8:54 pm

Will try them and report back, Thanks

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Keep old files that are not part of installer

Mon Aug 30, 2021 3:04 pm

You are always welcome!

Please let us know if there is anything else we could help you with and we will gladly assist.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”