# \[RESOLVED\] Windows\_package resource multi instance not installing correctly

**URL:** <https://discourse.chef.io/t/resolved-windows-package-resource-multi-instance-not-installing-correctly/10401>\
**Category:** Chef Infra (archive)\
**Created:** [February 13, 2017, 5:19pm UTC](https://discourse.chef.io/t/resolved-windows-package-resource-multi-instance-not-installing-correctly/10401 "2017-02-13T17:19:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stonesbg](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@stonesbg](https://discourse.chef.io/u/stonesbg)\
**Post date:** [February 13, 2017, 5:19pm UTC](https://discourse.chef.io/t/resolved-windows-package-resource-multi-instance-not-installing-correctly/10401/1 "2017-02-13T17:19:01Z")

</div>

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.

Is this possible?

---

<div class="post-metadata">

**Author:** ![kkeane](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kkeane](https://discourse.chef.io/u/kkeane)\
**Post date:** [February 14, 2017, 8:15pm UTC](https://discourse.chef.io/t/resolved-windows-package-resource-multi-instance-not-installing-correctly/10401/2 "2017-02-14T20:15:11Z")

</div>

MSI installers actually are designed to find earlier installations of the same software. They do that through a GUID installed in the Windows registry.

Kevin Keane  
Whom the IT Pros Call  
The NetTech  
[http://www.4nettech.com](http://www.4nettech.com)  
Our values: Privacy, Liberty, Justice  
See [https://www.4nettech.com/corp/the-nettech-values.html](https://www.4nettech.com/corp/the-nettech-values.html)

---

<div class="post-metadata">

**Author:** ![stonesbg](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@stonesbg](https://discourse.chef.io/u/stonesbg)\
**Post date:** [February 16, 2017, 1:03pm UTC](https://discourse.chef.io/t/resolved-windows-package-resource-multi-instance-not-installing-correctly/10401/3 "2017-02-16T13:03:56Z")

</div>

Is there a way to force it to ignore the GUID and to look at the registry DisplayName instead?

---

<div class="post-metadata">

**Author:** ![kkeane](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kkeane](https://discourse.chef.io/u/kkeane)\
**Post date:** [February 17, 2017, 9:37pm UTC](https://discourse.chef.io/t/resolved-windows-package-resource-multi-instance-not-installing-correctly/10401/4 "2017-02-17T21:37:18Z")

</div>

Not really; this goes very deep into Windows. It can be done but has to be supported by the software vendor.

There are two other options - both of them are really hacks, and ugly ones at that:

- You can download a tool called Orca from Microsoft. It is basically an MSI editor that lets you change such things.
- You can build your own MSI. There is a freeware (I think Open Source, but I’m not sure) tool called MakeMSI.

Kevin Keane  
Whom the IT Pros Call  
The NetTech  
[http://www.4nettech.com](http://www.4nettech.com)  
Our values: Privacy, Liberty, Justice  
See [https://www.4nettech.com/corp/the-nettech-values.html](https://www.4nettech.com/corp/the-nettech-values.html)
