summaryrefslogtreecommitdiff
path: root/lib/chef/win32
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2012-11-20 22:22:03 -0800
committerLamont Granquist <lamont@opscode.com>2012-12-19 15:54:41 -0800
commitc2fa0e1a0595735b0936f1d33ee07daccdedd5f1 (patch)
tree4b071caa03d7e35140a839a03e7d15301f5e4112 /lib/chef/win32
parent60b4e2b111308e989abd0e967c318419d7415aa0 (diff)
downloadchef-c2fa0e1a0595735b0936f1d33ee07daccdedd5f1.tar.gz
add 32/64 hooks for missed access points
Diffstat (limited to 'lib/chef/win32')
-rw-r--r--lib/chef/win32/registry.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb
index 298ffcd612..23b2ac73ae 100644
--- a/lib/chef/win32/registry.rb
+++ b/lib/chef/win32/registry.rb
@@ -109,7 +109,7 @@ class Chef
Chef::Log.debug("Registry key #{key_path} already exists, doing nothing")
else
hive, key = get_hive_and_key(key_path)
- hive.create key
+ hive.create(key, ::Win32::Registry::KEY_WRITE | registry_system_architecture)
Chef::Log.debug("Registry key #{key_path} created")
end
end
@@ -186,6 +186,7 @@ class Chef
return subkeys
end
+ # NB: 32-bit chef clients running on 64-bit machines will default to reading the 64-bit registry
def registry_system_architecture
applied_arch = ( architecture == :machine ) ? machine_architecture : architecture
( applied_arch == 'x86_64' ) ? 0x0100 : 0x0200
@@ -323,7 +324,7 @@ class Chef
existing_key_path = existing_key_path << "\\" << intermediate_key
if !key_exists?(existing_key_path)
Chef::Log.debug("Recursively creating registry key #{existing_key_path}")
- hive.create get_key(existing_key_path)
+ hive.create(get_key(existing_key_path), ::Win32::Registry::KEY_ALL_ACCESS | registry_system_architecture)
end
end
end