summaryrefslogtreecommitdiff
path: root/lib/chef/win32/registry.rb
diff options
context:
space:
mode:
authorClaire McQuin <claire@chef.io>2015-09-03 10:16:49 -0700
committerClaire McQuin <claire@chef.io>2015-09-03 11:18:26 -0700
commitc00a3bdc8e00e512f4c3cbb2ff7169ff20a66672 (patch)
tree9e38eac5c94ac5f9648927f88a4c9b2ba90ff5bf /lib/chef/win32/registry.rb
parent89aaa6076b7c4c4aea0e797d8cfcf6639c90816a (diff)
downloadchef-c00a3bdc8e00e512f4c3cbb2ff7169ff20a66672.tar.gz
Remove access mask to RegDeleteKeyExW, it's not useful
Diffstat (limited to 'lib/chef/win32/registry.rb')
-rw-r--r--lib/chef/win32/registry.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb
index 3a01553445..e699a9bc06 100644
--- a/lib/chef/win32/registry.rb
+++ b/lib/chef/win32/registry.rb
@@ -154,8 +154,7 @@ class Chef
#Using the 'RegDeleteKeyEx' Windows API that correctly supports WOW64 systems (Win2003)
#instead of the 'RegDeleteKey'
def delete_key_ex(hive, key)
- hive_num = hive.hkey - (1 << 32)
- RegDeleteKeyExW(hive_num, wstring(key), ::Win32::Registry::KEY_WRITE | registry_system_architecture, 0) == 0
+ RegDeleteKeyExW(hive.hkey, wstring(key), 0, 0) == 0
end
def key_exists?(key_path)