cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

How to handle dropping keyfiles and upgrades

I have an install that includes some database files, mdf & ldf.
The install for years has had the mdf files flagged as key files.

The company now wants the ability to move these database files to a different location, outside of the install.
If they do this, when the user starts the application it goes into repair mode and adds the database files back due to resiliency.

So I thought, why not just remove the key file flag for each of the components that include a mdf and ldf file.

The problem, the primary database that includes customer information now gets overwritten. The component id remains the same. The flags for never overwrite and permanent are the same. However, the setup clearly overwrites the mdf and ldf file of that component.

The only solution that comes to mind is to add a system search that sets a property that indicates that the database is installed and then set a condition on the component to only install if this condition is false.

Is there a better way for me to handle this?
Labels (1)
0 Kudos
(1) Reply
DLee65
Level 13

I also posted this question on StackOverflow and got some good answers there.

My solution:

  • Search Property table for REINSTALLMODE and delete it
  • Remove ComponentID guids for components in question


My installer had REINSTALLMODE set to 'amus' which forced all components to reinstall regardless of version.
Removing the ComponentID removes the files in question from tracking with Windows Installer resiliency checks.
0 Kudos