# Set Registry Value

> Sets a registry value with specified name, value and datatype at a specified path in the registry.

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

Sets a registry value with specified name, value and datatype at a specified path in the registry. The registry value can be set for the current user or all users on the endpoint including new users depending on the selected registry hive.

## Parameters

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

The registry hive - HKEY_CURRENT_USER sets the value for all users on the endpoint including new users Allowed values: `HKEY_LOCAL_MACHINE`, `HKEY_CURRENT_USER`.

#### Registry Variable Type
*Required* — Default: `String`

The type of the registry variable Allowed values: `String`, `DWORD (32-bit)`, `Expanded String`.

#### Registry Key
*Required* — Default: `SOFTWARE\Sample`

The path of the registry key within the registry hive - ex. SOFTWARE\Microsoft\Windows

#### Registry Variable Name
*Optional*

The name of the registry value. Example: AutoUpdate. Leave empty to set the default value.

#### Registry Variable Value
*Optional*

The value of the registry variable

## Details

- **Category:** Registry
- **Brick ID:** `Registry-Set-Value`

## Raw JSON definition

**JSON**

```json
{
  "category": "registry",
  "description": "Sets a registry value with specified name, value and datatype at a specified path in the registry. The registry value can be set for the current user or all users on the endpoint including new users depending on the selected registry hive.",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "Registry-Set-Value",
  "name": "Set Registry Value",
  "parameters": [
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "HKEY_LOCAL_MACHINE",
        "name": "HKEY_LOCAL_MACHINE"
      },
      "description": "The registry hive - HKEY_CURRENT_USER sets the value for all users on the endpoint including new users",
      "id": "Registry_Root",
      "name": "Registry Hive",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "HKEY_LOCAL_MACHINE",
          "name": "HKEY_LOCAL_MACHINE"
        },
        {
          "id": "HKEY_CURRENT_USER",
          "name": "HKEY_CURRENT_USER"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "String",
        "name": "String"
      },
      "description": "The type of the registry variable",
      "id": "Registry_Datatype",
      "name": "Registry Variable Type",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "String",
          "name": "String"
        },
        {
          "id": "DWORD (32-bit)",
          "name": "DWORD (32-bit)"
        },
        {
          "id": "Expanded String",
          "name": "Expanded String"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "SOFTWARE\\Sample",
      "defaultValueObject": null,
      "description": "The path of the registry key within the registry hive - ex. SOFTWARE\\Microsoft\\Windows",
      "id": "Registry_Key",
      "name": "Registry Key",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The name of the registry value. Example: AutoUpdate. Leave empty to set the default value.",
      "id": "Registry_Value_Name",
      "name": "Registry Variable Name",
      "regExValidation": "",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The value of the registry variable",
      "id": "Registry_Value",
      "name": "Registry Variable Value",
      "regExValidation": "",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "ZnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.9.1.1"
}
```
