Window msi package installation issue


#1

Hi,

I am trying to install msi patch for hpsitescope in window 2008 server I am getting the below error while I am compiling

default.rb

include_recipe “windows::default”

windows_package “S1122130614-11.22.000-WinNT4.0.msi” do
source "D:\HPSiteScope.11.2\S1122130614-11.22.000-WinNT4.0.msi"
options "/q"
installer_type :msi
action :install
end

Error:

  • gem_package[win32-mutex] action install←[0m (up to date)←[0m
    Recipe: HPSiteScope::default←[0m
  • windows_package[S1122130614-11.22.000-WinNT4.0.msi] action install←[0m←[0m
    ================================================================================←[0m
    ←[31mError executing action install on resource 'windows_package[S1122130614-11.22.000-WinNT4.0.msi]'←[0m
    ================================================================================←[0m

←[0m
NameError←[0m
---------←[0m
uninitialized constant Chef::Win32::Registry::HKEY_LOCAL_MACHINE←[0m

←[0m
Resource Declaration:←[0m
---------------------←[0m

In C:/Users/chef/cookbooks/HPSiteScope/recipes/default.rb

4: windows_package “S1122130614-11.22.000-WinNT4.0.msi” do
5: source "D:\HPSiteScope.11.2\S1122130614-11.22.000-WinNT4.0.msi"
6: options "/q"
7: installer_type :msi
8: action :install
9: end←[0m

←[0m
Compiled Resource:←[0m
------------------←[0m

Declared in C:/Users/chef/cookbooks/HPSiteScope/recipes/default.rb:4:in `from_file’

windows_package(“S1122130614-11.22.000-WinNT4.0.msi”) do
action [:install]
retries 0
retry_delay 2
cookbook_name :HPSiteScope
recipe_name "default"
source "D:\HPSiteScope.11.2\S1122130614-11.22.000-WinNT4.0.msi"
options "/q"
installer_type :msi
package_name "S1122130614-11.22.000-WinNT4.0.msi"
end
←[0m

←[0m

I am new to development and window Any one faced the issue similar to that?

Is there is anything that need to be along with the code.

Thanks & Regards,
Premkumar


#2

Premukar, what version of the chef-client are you using? I’ve tried to make
this failure occur on 11.8.2, and everything works fine for me. If you’re
running Chef 10, or even a version prior to 11.4, I would not expect the
HKEY_LOCAL_MACHINE constant that exists in current Chef releases to be
present in the chef gem.

-Adam

From: Gontrand, Premkumar [mailto:Premkumar.Gontrand@fmr.com]
Sent: Monday, January 6, 2014 10:20 PM
To: chef@lists.opscode.com
Subject: [chef] window msi package installation issue

Hi,

I am trying to install msi patch for hpsitescope in window 2008 server I am
getting the below error while I am compiling

default.rb

include_recipe “windows::default”

windows_package “S1122130614-11.22.000-WinNT4.0.msi” do

source “D:\HPSiteScope.11.2\S1122130614-11.22.000-WinNT4.0.msi”

options “/q”

installer_type :msi

action :install

end

Error:

  • gem_package[win32-mutex] action install←[0m (up to date)←[0m

Recipe: HPSiteScope::default←[0m

  • windows_package[S1122130614-11.22.000-WinNT4.0.msi] action
    install←[0m←[0m

================================================================================←[0m

←[31mError executing action install on resource
’windows_package[S1122130614-11.22.000-WinNT4.0.msi]'←[0m

================================================================================←[0m

←[0m

NameError←[0m

---------←[0m

uninitialized constant Chef::Win32::Registry::HKEY_LOCAL_MACHINE←[0m

←[0m

Resource Declaration:←[0m

---------------------←[0m

In C:/Users/chef/cookbooks/HPSiteScope/recipes/default.rb

4: windows_package “S1122130614-11.22.000-WinNT4.0.msi” do

5: source “D:\HPSiteScope.11.2\S1122130614-11.22.000-WinNT4.0.msi”

6: options “/q”

7: installer_type :msi

8: action :install

9: end←[0m

←[0m

Compiled Resource:←[0m

------------------←[0m

Declared in C:/Users/chef/cookbooks/HPSiteScope/recipes/default.rb:4:in

`from_file’

windows_package(“S1122130614-11.22.000-WinNT4.0.msi”) do

action [:install]

retries 0

retry_delay 2

cookbook_name :HPSiteScope

recipe_name “default”

source “D:\HPSiteScope.11.2\S1122130614-11.22.000-WinNT4.0.msi”

options “/q”

installer_type :msi

package_name “S1122130614-11.22.000-WinNT4.0.msi”

end

←[0m

←[0m

I am new to development and window Any one faced the issue similar to
that?

Is there is anything that need to be along with the code.

Thanks & Regards,

Premkumar