Macy
Posts: 18
Joined: Sun Nov 25, 2007 2:02 am

Stopping a file overwrite...

We install an empty database with our application, and the user adds data into it. When the user installs version 1.2 of our app over the top of version 1.1, we end up overwriting the database they have modified. Is there a way to prevent that? Hmmmmmmm come to think of it, I wonder if we are actually deleting the database during the transparent uninstall of 1.1 that occurs during the 1.2 install. If that is the case, how can I prevent a file that we install from being uninstalled?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Stopping a file overwrite...

Hi,

During a major upgrade the old version is completely uninstalled and the new version is installed. If you want to make sure that the original database file is not removed, you can try one of these approaches:

1) Use the "Never Overwrite" and "Permanent" attributes for the component of the database. In this case the installation package should use a custom action to remove the database for a complete uninstall.

2) Backup the database file when the new version is launched and restore it after the upgrade is complete. Please note that the User Guide contains the Preserve File on Install how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”