We are using the package resource within our chef run (example below). We are running this on windows environment and therefore it actually runs windows_package.
package “#{cookbook_name}_#{recipe_name}_application” do
package_name "Application Name (Instance 1)"
source path_to_installer
action :install
end
The issues is when we are deploying multiple instances we change the package_name attribute so that when it looks up in the registry it won’t find the previous instances. For example first run will be “Application name (Instance 1)” second run will be “Application name (Instance 2)”.
The issue is that instance 2 is not getting installed as it says the package and version is already installed. What I think is happening is it is looking up the “source path_to_installer” and matching on that as the msi path are the same.
MSI installers actually are designed to find earlier installations of the same software. They do that through a GUID installed in the Windows registry.