registry_key_absent

Ensure that a registry key does not exist.

⚙️ Compatible targets: Windows

Parameters

NameDocumentation
keyRegistry key (ie, HKLM:\Software\Rudder).

This parameter is required.

Outcome conditions

You need to replace ${key} with its actual canonified value.

  • ✅ Ok: registry_key_absent_${key}_ok
    • ☑️ Already compliant: registry_key_absent_${key}_kept
    • 🟨 Repaired: registry_key_absent_${key}_repaired
  • ❌ Error: registry_key_absent_${key}_error

Example

method: registry_key_absent
params:
  key: VALUE

Documentation

Remove a Registry Key if it is present on the system.

There are two different supported syntaxes to describe a Registry Key:

  • with short drive like HKLM:\SOFTWARE\myKey
  • with long drive name preceded by Registry:: like Registry::HKEY_LOCAL_MACHINE\SOFTWARE\myKey

Please, note that Rudder can not remove drives and "first-level" Registry Keys.

Examples

-name: Short name first-level key syntax
 method: registry_key_absent
   key: "HKLM:\SOFTWARE\Rudder"

-name: Long name first-level key syntax
 method: registry_key_absent
   key: "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Rudder"