Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force file replacement on MSI upgrade

Using Installshield 2010 with a Basic MSI project.

I have several config files that have to be replaced during an upgrade. Since they are config files, they don't have a version. I believe they aren't replaced during because during the original install, the configs are modified by the installer. This sets the modified date different than the creation date. As I understand it the unversioned file has been modified the upgrade won't replace it.

Is there a way to force the replacement ? I have some bootstrap prerequsites that require a setup.exe so I would rather not modify the .msi in orca.

like image 844
Web Avatar asked Apr 04 '11 18:04

Web


1 Answers

MSI has a concept called Version Lying. (Well, actually it's a hack around MSI's default file versioning rules.) InstallShield's implementation of this is to put a really high number into the File table. Go through components | files and do a right click properties on the file in question and select always overwrite.

Note: It'll be best if this file is also the key file of it's own component. Wierd things could happen ( or not happen ) to this file or other files if it's not if you hit the right circumstances. ( See: Component Rules )

like image 73
Christopher Painter Avatar answered Nov 15 '22 08:11

Christopher Painter