Module: PuppetX::Puppetlabs::Registry Private

Defined in:
lib/puppet_x/puppetlabs/registry.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: RegistryKeyPath, RegistryPathBase, RegistryValuePath

Constant Summary collapse

KEY_WOW64_64KEY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

rubocop:enable Style/ClassAndModuleChildren For 64-bit OS, use 64-bit view. Ignored on 32-bit OS

0x100
KEY_WOW64_32KEY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

For 64-bit OS, use 32-bit view. Ignored on 32-bit OS

0x200

Class Method Summary collapse

Class Method Details

.hiveObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



24
25
26
# File 'lib/puppet_x/puppetlabs/registry.rb', line 24

def self.hive
  hkeys[root]
end

.hkeysObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
19
20
21
22
# File 'lib/puppet_x/puppetlabs/registry.rb', line 16

def self.hkeys
  {
    hkcr: Win32::Registry::HKEY_CLASSES_ROOT,
    hklm: Win32::Registry::HKEY_LOCAL_MACHINE,
    hku: Win32::Registry::HKEY_USERS
  }
end

.name2type(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



44
45
46
47
48
# File 'lib/puppet_x/puppetlabs/registry.rb', line 44

def self.name2type(name)
  name2type = {}
  type2name_map.each_pair { |k, v| name2type[v] = k }
  name2type[name]
end

.type2name(type) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
# File 'lib/puppet_x/puppetlabs/registry.rb', line 40

def self.type2name(type)
  type2name_map[type]
end

.type2name_mapObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/puppet_x/puppetlabs/registry.rb', line 28

def self.type2name_map
  {
    Win32::Registry::REG_NONE => :none,
    Win32::Registry::REG_SZ => :string,
    Win32::Registry::REG_EXPAND_SZ => :expand,
    Win32::Registry::REG_BINARY => :binary,
    Win32::Registry::REG_DWORD => :dword,
    Win32::Registry::REG_QWORD => :qword,
    Win32::Registry::REG_MULTI_SZ => :array
  }
end