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

Problem with preventing file overwrite on upgrade

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.
Labels (1)
0 Kudos
(2) Replies
tjohnson1
Technical Writer
Technical Writer

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.
0 Kudos
TsungH
Level 12

Per Component Table, msidbComponentAttributesNeverOverwrite attribute will work if a key path file or a key path registry entry for the component already exists.
0 Kudos