View Full Version : Problem with preventing file overwrite on upgrade

10-07-2013, 01:43 PM
Setup package: Basic MSI
I am creating a package that needs to upgrade a package that was generated using Wise Installer. I have a component that on upgrade is overwriting the previous component even though I have the same component name and ComponentID and I have set the attribute bits 'Permanent', 'Never Overwrite'.
The mdf file is the key file in the new component.

Ahh, in typing this out it looks like the .ldf was set as the key file in the original wise installer component.

If it were my choice I would much rather build the database at runtime and get rid of delivering mdf files with the setup, but I am not the project manager here. I have suggested as such but moving the bit stream takes some time.

In anycase, I will try the ldf as the key file to see if that works, but barring that; does anyone have any ideas of why my new component is not being recognized as the same as the other component? At first I did not even think the component name needed to be the same, just the ComponentID. But for now I am going with the original name even though it is not logically named for the files included inside the component. I was hoping to get away from some of the poor design choices for the old wise project, but I still have to support upgrading previous versions.

12-04-2013, 12:08 PM
Hi Dan,

The permanent and never overwrite setting only affect the new install. This would've needed to be specified in the old install to prevent the install from overwriting.

12-04-2013, 02:56 PM
Per Component Table (http://msdn.microsoft.com/en-us/library/aa368007(v=vs.85).aspx), msidbComponentAttributesNeverOverwrite attribute will work if a key path file or a key path registry entry for the component already exists.