registry_entry_present
Ensure the value of a registry entry is correct.
⚙️ Compatible targets: Windows
Parameters
Name | Documentation |
---|---|
key | Registry key path (ie, HKLM:\Software\Rudder). This parameter is required. |
entry | Registry entry name. This parameter is required. |
value | Registry value. This parameter is required. |
registryType | Registry value type (String, ExpandString, MultiString, Dword, Qword). Choices:
This parameter is required. |
Outcome conditions
You need to replace ${entry}
with its actual canonified value.
- ✅ Ok:
registry_entry_present_${entry}_ok
- ☑️ Already compliant:
registry_entry_present_${entry}_kept
- 🟨 Repaired:
registry_entry_present_${entry}_repaired
- ☑️ Already compliant:
- ❌ Error:
registry_entry_present_${entry}_error
Example
method: registry_entry_present
params:
value: VALUE
key: VALUE
entry: VALUE
registryType: String
Documentation
If the key and/or its entry does not exist yet, it will be created.
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::
likeRegistry::HKEY_LOCAL_MACHINE\SOFTWARE\myKey
Please, note that Rudder can not create new drive and new "first-level" Registry Keys.
Examples
- name: Rudder registry "myEntry" property must be set to 1
method: registry_entry_present
key: "HKLM:\SOFTWARE\Rudder"
entry: "myEntry"
value: "1"
registryType: "Dword"
- name: Rudder registry "myEntry" property must be set to 1
method: registry_entry_present
key: "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Rudder"
entry: "myEntry"
value: "1"
registryType: "Dword"