# Installing MSI's with Chef

**URL:** <https://discourse.chef.io/t/installing-msis-with-chef/5475>\
**Category:** Chef Infra (archive)\
**Created:** [June 30, 2014, 6:47pm UTC](https://discourse.chef.io/t/installing-msis-with-chef/5475 "2014-06-30T18:47:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_Barry](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@Kenneth\_Barry](https://discourse.chef.io/u/Kenneth_Barry)\
**Post date:** [June 30, 2014, 6:47pm UTC](https://discourse.chef.io/t/installing-msis-with-chef/5475/1 "2014-06-30T18:47:24Z")

</div>

I’m unsure if I am using it correctly.

When the install is done manually, it take a very very very long time.

Here is my recipe section:

…  
windows\_package ‘ActivePerl 5.16.3 Build 1604’ do  
source "c:\temp\ActivePerl-5.16.3.1604-MSWin32-x64-298023.msi"  
options '/q /lvx\* c:\temp\activeperl.log’  
installer\_type :custom  
action :install  
end  
…

Here is the output from chef-client

[2014-06-30T13:22:30-05:00] INFO: Processing windows\_package[ActivePerl  
5.16.3 Build 1604] action i  
nstall (nonwebserver::taskanalytics line 150)  
[2014-06-30T13:22:30-05:00] INFO: Installing windows\_package[ActivePerl  
5.16.3 Build 1604] version  
latest  
[2014-06-30T13:22:30-05:00] INFO: Starting installation…this could take  
awhile.

I think it might be hanging. (get-process on the box thats being cheffed  
doesnt show msiexec, as i am expecting)

I wanna start at the beginning, and just make sure that I am even using the  
resource properly. How do I know if I am using the windows\_package from the  
cookbook over the one thats baked in to the core?

---

<div class="post-metadata">

**Author:** ![Aditya\_Karanjkar](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Aditya\_Karanjkar](https://discourse.chef.io/u/Aditya_Karanjkar)\
**Post date:** [June 30, 2014, 10:15pm UTC](https://discourse.chef.io/t/installing-msis-with-chef/5475/2 "2014-06-30T22:15:22Z")

</div>

Hi Kenneth,

By what I understand, the resource that is provided by the windows cookbook  
will be used if you include the cookbook as a dependency in the metadata.rb  
file. So for e.g in metadata.rb, include the following line:

depends 'windows'

Also as the package that you want to install is a MSI, you should be  
specifying the installer\_type as :msi:

windows\_package 'ActivePerl 5.16.3 Build 1604' do  
source "c:\temp\ActivePerl-5.16.3.1604-MSWin32-x64-298023.msi"  
options '/q /lvx\* c:\temp\activeperl.log'  
installer\_type _:msi_  
action :install  
end

Hope this helps.

-Aditya

On Mon, Jun 30, 2014 at 11:47 AM, Kenneth Barry [kbarry-x@tunein.com](mailto:kbarry-x@tunein.com) wrote:

> I'm unsure if I am using it correctly.
> 
> When the install is done manually, it take a very very very long time.
> 
> Here is my recipe section:
> 
> ...  
> windows\_package 'ActivePerl 5.16.3 Build 1604' do  
> source "c:\temp\ActivePerl-5.16.3.1604-MSWin32-x64-298023.msi"  
> options '/q /lvx\* c:\temp\activeperl.log'  
> installer\_type :custom  
> action :install  
> end  
> ...
> 
> Here is the output from chef-client
> 
> [2014-06-30T13:22:30-05:00] INFO: Processing windows\_package[ActivePerl  
> 5.16.3 Build 1604] action i  
> nstall (nonwebserver::taskanalytics line 150)  
> [2014-06-30T13:22:30-05:00] INFO: Installing windows\_package[ActivePerl  
> 5.16.3 Build 1604] version  
> latest  
> [2014-06-30T13:22:30-05:00] INFO: Starting installation...this could take  
> awhile.
> 
> I think it might be hanging. (get-process on the box thats being cheffed  
> doesnt show msiexec, as i am expecting)
> 
> I wanna start at the beginning, and just make sure that I am even using  
> the resource properly. How do I know if I am using the windows\_package from  
> the cookbook over the one thats baked in to the core?
