# Set Registry Permissions

> Adds permissions for a specified user or group to a registry key with a specified inheritance type.

Source: https://docs.capaone.com/capaone/application-manager/powerbricks/set-registry-permissions/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

Adds permissions for a specified user or group to a registry key with a specified inheritance type.

## Parameters

#### Registry Root
*Required* — Default: `HKEY_LOCAL_MACHINE`

The registry hive to add the permission to Allowed values: `HKEY_CLASSES_ROOT`, `HKEY_LOCAL_MACHINE`, `HKEY_USERS`, `HKEY_CURRENT_CONFIG`.

#### Registry Key
*Required*

The registry key to add the permission to

#### User or group
*Required*

The user or group to add permissions for - ex. Domain\User or $env:COMPUTERNAME\LocalGroupName or S-1-5-32-544 or BUILTIN\Users. Please add only one user or group.

#### Permission
*Required* — Default: `Full Control`

Choose Permission Allowed values: `Change Permissions`, `Create Link`, `Create SubKey`, `Delete`, `Enumerate SubKeys`, `Execute Key`, `Full Control`, `Notify`, `Query Values`, `Read Key`, `Read Permissions`, `Set Value`, `Take Ownership`, `Write Key`.

#### Require Registry Key To Exist
*Optional* — Default: `True`

Enable to stop with an error when the registry key does not exist. Disable only if the key is expected to be missing on some machines.

## Details

- **Category:** Permissions
- **Brick ID:** `Registry-Add-Permission`

## Raw JSON definition

**JSON**

```json
{
  "category": "permissions",
  "description": "Adds permissions for a specified user or group to a registry key with a specified inheritance type.",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "Registry-Add-Permission",
  "name": "Set Registry Permissions",
  "parameters": [
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": {
        "id": "HKEY_LOCAL_MACHINE",
        "name": "HKEY_LOCAL_MACHINE"
      },
      "description": "The registry hive to add the permission to",
      "id": "RegistryRoot",
      "name": "Registry Root",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "HKEY_CLASSES_ROOT",
          "name": "HKEY_CLASSES_ROOT"
        },
        {
          "id": "HKEY_LOCAL_MACHINE",
          "name": "HKEY_LOCAL_MACHINE"
        },
        {
          "id": "HKEY_USERS",
          "name": "HKEY_USERS"
        },
        {
          "id": "HKEY_CURRENT_CONFIG",
          "name": "HKEY_CURRENT_CONFIG"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The registry key to add the permission to",
      "id": "RegistryKey",
      "name": "Registry Key",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The user or group to add permissions for - ex. Domain\\User or $env:COMPUTERNAME\\LocalGroupName or S-1-5-32-544 or BUILTIN\\Users. Please add only one user or group.",
      "id": "Identity",
      "name": "User or group",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": {
        "id": "FullControl",
        "name": "Full Control"
      },
      "description": "Choose Permission",
      "id": "Right",
      "name": "Permission",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "ChangePermissions",
          "name": "Change Permissions"
        },
        {
          "id": "CreateLink",
          "name": "Create Link"
        },
        {
          "id": "CreateSubKey",
          "name": "Create SubKey"
        },
        {
          "id": "Delete",
          "name": "Delete"
        },
        {
          "id": "EnumerateSubKeys",
          "name": "Enumerate SubKeys"
        },
        {
          "id": "ExecuteKey",
          "name": "Execute Key"
        },
        {
          "id": "FullControl",
          "name": "Full Control"
        },
        {
          "id": "Notify",
          "name": "Notify"
        },
        {
          "id": "QueryValues",
          "name": "Query Values"
        },
        {
          "id": "ReadKey",
          "name": "Read Key"
        },
        {
          "id": "ReadPermissions",
          "name": "Read Permissions"
        },
        {
          "id": "SetValue",
          "name": "Set Value"
        },
        {
          "id": "TakeOwnership",
          "name": "Take Ownership"
        },
        {
          "id": "WriteKey",
          "name": "Write Key"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "True",
      "defaultValueObject": null,
      "description": "Enable to stop with an error when the registry key does not exist. Disable only if the key is expected to be missing on some machines.",
      "id": "ShouldPathExist",
      "name": "Require Registry Key To Exist",
      "regExValidation": "",
      "required": false,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "ZnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.9.1.1"
}
```
