I have a MSI build using WiX version 3.
All previous installers for the product we are deploying worked fine with the configuration specified (that is: if previous version exists, remove, then install the new version) - however, the new MSIs we build don't install all files when it runs through the 'remove first' path.
If we manually remove the existing installation and then run the new version all the files are installed - and when I examine the MSI file in Orca the files and features are shown and seem to be fine.
We have tried running with verbose and extra logging turned on (/l*vx
) however all we can see if that the files are not being registered & then installed.
Any thoughts or suggestions? This is driving us up the wall.
Based on the default custom action sequence, Windows Installer determines which files need to be installed/overwritten before removing any existing versions of software. Windows Installer uses the value of the REINSTALLMODE property to tell it how to make decisions about when to overwrite files. If REINSTALLMODE contains an "o", then it will only install files where the version is different or the file doesn't already exist; non-versioned files will only be installed if the Modified Date of the file is <= the Created Date (i.e. the file is not modified). If the REINSTALLMODE contains an "a", it will always install the file, regardless of any version or date information attached to existing files.
What is happening in your scenario is most likely the following:
The end result is that a bunch of files are missing after upgrading the software. Setting REINSTALLMODE=amus instead of omus will likely fix your problem, but you should make sure you know how this affects the rest of your installation. If there are any files that you don't want to be overwritten, you will need to mark those components to "Never Overwrite".
OK, well talking to someone else where I am helped me find a solution to the problem.
We added the property REINSTALLMODE
and set it to amus
. What does this mean?
By default the property is set to omus
which means: Reinstall if the file is missing or older, rewrite registry for machine and user hives, reinstall shortcuts. Changing this to amus
basically says: Reinstall all files.
So, not 100% sure what the cause was - I suspect there may have been strange locks or something, but setting to amus
doesn't being on any adverse effects, so we'll stick with that.
Thanks for the suggestions.
(Also, more details on this property can be found here: MSDN: REINSTALLMODE Property
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With