salt.states.reg

Manage the registry on Windows

salt.states.reg.absent(name)

Remove a registry key

Example:

'HKEY_CURRENT_USER\SOFTWARE\Salt\version':
  reg.absent
salt.states.reg.present(name, value, vtype='REG_DWORD', reflection=True)

Set a registry entry

Optionally set reflection to False to disable reflection. reflection has no effect on a 32-bit OS.

In the example below, this will prevent Windows from silently creating the key in: HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Salt\version

Example:

HKEY_CURRENT_USER\SOFTWARE\Salt\version:
  reg.present:
    - value: 0.15.3
    - vtype: REG_SZ
    - reflection: False