bgoldca
Level 3

Why do some files overwrite and others don't upon upgrade?

I know this is an old topic, but I can't find any sufficient answers so I'm posting it again. I've found several pages that say that files cannot be overwritten unless the version of the file is higher than the existing file, but most say that using Always Overwrite should overwrite the files upon upgrade. Yet when I do a new install over an existing install or an upgrade about half of my files are overwritten and half are not and they're all marked as Always Overwrite. Please let me know your thoughts or if you have any questions.

Thanks!
Ben

p.s. This is for InstallShield 2013 but that forum doesn't get many views so I'm posting it here. I think they should behave the same way.
Labels (1)
0 Kudos
4 Replies
Cary_R
Level 11

bgoldca wrote:
I know this is an old topic, but I can't find any sufficient answers so I'm posting it again. I've found several pages that say that files cannot be overwritten unless the version of the file is higher than the existing file, but most say that using Always Overwrite should overwrite the files upon upgrade. Yet when I do a new install over an existing install or an upgrade about half of my files are overwritten and half are not and they're all marked as Always Overwrite. Please let me know your thoughts or if you have any questions.

Thanks!
Ben

p.s. This is for InstallShield 2013 but that forum doesn't get many views so I'm posting it here. I think they should behave the same way.


Post a log. That will tell us why.

things to look out for:

Features with an "Advertised" state during InstallValidate. (this means a component was removed across upgrades)
Components that won't overwrite, denoted by "Disallowing Installation of component {xx} because xx"
If nothing there, look for the FileCopy() operation during InstallFinalize which mentions that file. It'll tell you if it decides not to copy the file during InstallFinalize, and the reason.
Being that these are clearly *.dll files, does restarting the machine upgrade the files? (there's a myriad of options for restart behavior, so it's easier to ask this question than: are the files locked? It may not be evident)


I can't access it, but I guess you can request community access to some KB articles. This one is useful:

https://flexeracommunity.force.com/customer/articles/en_US/HOWTO/Q200372
0 Kudos
Stefan_Krueger
Level 9

Also, each DLL needs to be in its separate component and must be marked as key file of that component.
Avoid dynamic linked files, especially dynamically including subfolders.
You may want to run validation to see if you missed any design rules.
(This is all assuming your project type is "Basic MSI", not "InstallScript")
Stefan Krueger
InstallSite.org
0 Kudos
agshah
Level 6

What I noticed is the if the version number of files has not changed, it does not get overwritten. You have to mark it as 'Always Overwrite' in the individual file properties.
0 Kudos
Stefan_Krueger
Level 9

agshah wrote:
What I noticed is the if the version number of files has not changed, it does not get overwritten. You have to mark it as 'Always Overwrite' in the individual file properties.

That's expected behaviour. The purpose of a version number is to indicate whether the file is newer and should replace the older one. Make sure you increment file versions properly.
Stefan Krueger
InstallSite.org
0 Kudos