R – How to tell MSI not to ovewrite existing file in Setup & Deployment Project in VS2005

installationsetup-projectvisual-studio-2005

I've got a Setup & Deployment Project in VS2005. One of the files that i'm installing is a SQLite data file.

I'm about to release a new version for the software, but i found that if i run the update on existing installation it overwrites the data file.

I've got an updated data file in the setup project so it's newer than already installed, but i don't want to overwrite it.

I've tries setting the Permanent property for that file to True, but to no avail.

Any suggestions?

Best Answer

Ok, here's a workaround that i've used:

  • In my setup project I've renamed my blank database file from Database.db to Database-blank.db.
  • In my app i'm checking if Database.db is missing and copying Database-blank.db to Database.db if it is.
  • then just load existing Database.db

This way i can ensure the local copy of the data file (Database.db) does not get replaced by newer versions of the software.

Related Topic