How to ignore MSI Version chefk with windows_package


#1

I have a situation where I have an .msi file, which seems to just be a bundled installer for multiple different applications. When running the MSI via the GUI you use the WiX feature tree options to select which of the multiple applications you want to install.

The issue that I'm running into with doing silent installs with Chef using the built-in windows_package resource, is that I'm only able to install one of the applications.

My setup is that I have a recipe for each application. The recipes use the windows_package resource to run the MSI installer, and use the ADDLOCAL option to specify which application (feature) should be installed. This works perfectly, except that if I then attempt to run any of the other recipes to install the other applications, the resource reports up to date and doesn't install. I believe this is because the MSI is the same for the different resources, and once it has been run once, and one of the applications has been installed, then the MSI gets reported as being installed with its current version, and any subsequent runs see that the MSI is installed with the same version as the one that is trying to install and gets skipped.

Is there anyway to alter this behavior? Essentially I guess, a way to make the windows_package resource NOT idempotent?

Any help is much appreciated.


#2

I don't think we have a solution here other than either running MSIEXEC outside of windows_package (execute resource), and/or using the :remove action on windows_package prior to the new installation.

Stuart


#3

Ok, I'll give the execute resource a try. Thank you Stuart.