Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSI does not install all files when RemovePreviousVersion is run

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.

like image 471
Matthew Savage Avatar asked Mar 18 '09 23:03

Matthew Savage


People also ask

How do I force an MSI package to install using administrator mode?

First Option Open elevated Command Prompt. To do so, type "CMD" in Start menu or Start screen search box, and then simultaneously press Ctrl+Shift+Enter keys. Click Yes button when you see the UAC prompt. In the Command Prompt, navigate to the directory that the install file is located in and run the install file.

What is silent installation of MSI?

It uses msiexec.exe to install the setup and accepts the standard MSI parameters. MSI's silent install standard parameters are as follows: /quiet - quiet mode (there is no user interaction) /passive - unattended mode (the installation shows only a progress bar)

Do you need admin rights to install MSI?

msi format, which is the standard format for Windows Installer Server. Because system resources access are required for software to function, they require system admin privileges during installation.


1 Answers

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:

  1. Windows Installer determines which files to install. It decides that some files don't need to be installed (possibly because they already exist and are of the same or newer versions as the ones in the MSI).
  2. The previous version of software is removed, including the files Windows Installer determined didn't need to be installed.
  3. Windows installer installs files for the new installation, but does not install files that it determined did not need to be installed.

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".

like image 94
Kevin Kibler Avatar answered Nov 11 '22 00:11

Kevin Kibler