Unsupported content


This version of the product is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.


discovery.registryKey(target, key [, win64_redirect=true|false])

Retrieves a registry key from a Windows computer.

64 bit Windows hosts have the following registry keys:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node — 32 bit values

win64_redirect is an optional flag which enables you to specify whether the search for the registry key should take place in the 32 bit section if not found in the 64 bit section. TRUE means search the 32 bit section, FALSE means do not search the 32 bit section even if the key is not found in the 64 bit section. The default is TRUE.

On non-Windows and 32 bit Windows systems win64_redirect has no effect.

The win64_redirect flag is new in 8.2.

Returns a DiscoveredRegistryValue node.

The following code examples shows discovery.registryKey being used to determine the vendor of the first CPU of a the Windows machine.

// Get the vendor of the first CPU
vendor := discovery.registryKey(host, "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\VendorIdentifier");

if vendor then
    log.debug("Vendor value: %vendor.value%");
end if;
Was this page helpful? Yes No Submitting... Thank you


  1. Dario Soldera

    There is a typo in the example --> discovery.regstEryKey The function is discovery.registryKey, not discovery.registeryKey

    Oct 15, 2019 05:44
    1. Vinay Bellare

      Hi Dario,

      Thanks for pointing out the typo. I've set it right.

      Oct 16, 2019 11:18