Windows Registry
Tacoscript comes with functions to modify your windows registry.
The task win_reg.present
ensures that the specified registry value is present in the registry.
win_reg.present
has following format:
maintain-my-windows-registry:
win_reg.present:
- reg_path: 'HKLM:\System\CurrentControlSet\Control\Terminal Server'
- name: fDenyTSConnections
- value: 0
- type: REG_SZ
We can interpret this script as:
- Using the terminal server registry path, make sure the value with the name
fDenyTSConnections
is set to a0
string.
This is the registry path to check for the desired value
with the registry name
specified below.
This is the name
of the registry value to ensure is present at the registry path specified above.
This is the value that must be present. If there is no value currently then a new value will be set. If there is an existing value then it will be replaced.
required stringThis is the registry type of the value to be present. If there is an existing value with a different type then both the value and type will be updated.
The task win_reg.absent
ensures that the specified registry value is present in the registry.
win_reg.absent
has following format:
maintain-my-windows-registry:
win_reg.absent:
- path: 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
- name: VMware User Process
We can interpret this script as:
- Ensure that the registry value with the name
VMware User Process
at the registry path location specified is not set / absent
This is the registry path to check that the registry value with the name
specified below is not set.
This is the name
of the registry value to ensure is absent at the registry path specified above.
The task win_reg.absent_key
ensures that the specified registry key is not in the registry.
win_reg.absent_key
has following format:
maintain-my-windows-registry:
win_reg.absent_key:
- reg_path: 'HKCU:\Software\GoProgrammingLanguage'
We can interpret this script as:
- Completely remove the
GoProgrammingLanguage
registry key and all sub-keys and values
This is the registry path to ensure is absent. Will recursively remove all sub-keys and values. Use with great caution.