# Execute Process

> Executes a specified process with given arguments and options.

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

Executes a specified process with given arguments and options. This PowerBrick allows you to run any executable or command-line tool on the target machine, providing flexibility for various use cases such as software installation, system configuration, or running custom scripts.

## Parameters

#### Process Path
*Required*

Specifies the full path to the executable or command to run. This should be the complete path to the executable file or a command that is available in the system PATH.\\nSample: C:\\Windows\\System32\\dism.exe

#### Process Arguments
*Optional*

Specifies the command-line arguments to pass to the process.\\nSample: /Online /Add-Driver /Driver:C:\\Drivers\\wifidriver\\driver.inf

#### Working directory path
*Optional*

Specifies the working directory for the process. If not specified, the process will use its default working directory. Sample: C:\\temp

#### Wait for process
*Required* — Default: `True`

Enable to wait for the process to finish before continuing. Disable to continue immediately after process start.

#### Window Style
*Optional* — Default: `Hidden`

The Window style of the process. (Hidden, Normal, Minimized, Maximized) Allowed values: `Hidden`, `Normal`, `Minimized`, `Maximized`.

#### Check if process exist
*Required* — Default: `False`

Enable to validate that the process path exists on the endpoint before execution. Disable to skip this validation.

#### User Context
*Optional* — Default: `SYSTEM`

Specifies the user context in which to run the process. SYSTEM (default), LoggedOnUser (runs as currently logged-on user, retries later if no user is logged on), or TempAdministratorUser (runs as temporary admin account with automatic cleanup). Allowed values: `Logged On User`, `Temp Administrator User`, `SYSTEM`.

#### Return Code Handles
*Required*

Specify how each return code from the process is handled. Success continues the job, Failure stops the job as failed with that return code, and Retry Execution Later stops the job and runs it again later. Any return code not in the list stops the job as failed. Allowed values: `Success`, `Failure`, `Retry Execution Later`.

## Details

- **Category:** Installer
- **Brick ID:** `Execute-Process`

## Raw JSON definition

```json
{
  "category": "installer",
  "description": "Executes a specified process with given arguments and options. This PowerBrick allows you to run any executable or command-line tool on the target machine, providing flexibility for various use cases such as software installation, system configuration, or running custom scripts.",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "Execute-Process",
  "name": "Execute Process",
  "parameters": [
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "Specifies the full path to the executable or command to run. This should be the complete path to the executable file or a command that is available in the system PATH.\\nSample: C:\\Windows\\System32\\dism.exe",
      "id": "ProcessPath",
      "name": "Process Path",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "Specifies the command-line arguments to pass to the process.\\nSample: /Online /Add-Driver /Driver:C:\\Drivers\\wifidriver\\driver.inf",
      "id": "ProcessArguments",
      "name": "Process Arguments",
      "regExValidation": "",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "Specifies the working directory for the process. If not specified, the process will use its default working directory. Sample: C:\\temp",
      "id": "WorkingDirectory",
      "name": "Working directory path",
      "regExValidation": "",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "True",
      "defaultValueObject": null,
      "description": "Enable to wait for the process to finish before continuing. Disable to continue immediately after process start.",
      "id": "ProcessWait",
      "name": "Wait for process",
      "regExValidation": "",
      "required": true,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "0",
        "name": "Hidden"
      },
      "description": "The Window style of the process. (Hidden, Normal, Minimized, Maximized)",
      "id": "WindowStyle",
      "name": "Window Style",
      "regExValidation": "",
      "required": false,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "0",
          "name": "Hidden"
        },
        {
          "id": "1",
          "name": "Normal"
        },
        {
          "id": "2",
          "name": "Minimized"
        },
        {
          "id": "3",
          "name": "Maximized"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "False",
      "defaultValueObject": null,
      "description": "Enable to validate that the process path exists on the endpoint before execution. Disable to skip this validation.",
      "id": "CheckProcessExist",
      "name": "Check if process exist",
      "regExValidation": "",
      "required": true,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "SYSTEM",
        "name": "SYSTEM"
      },
      "description": "Specifies the user context in which to run the process. SYSTEM (default), LoggedOnUser (runs as currently logged-on user, retries later if no user is logged on), or TempAdministratorUser (runs as temporary admin account with automatic cleanup).",
      "id": "UserContext",
      "name": "User Context",
      "regExValidation": "",
      "required": false,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "LoggedOnUser",
          "name": "Logged On User"
        },
        {
          "id": "TempAdministratorUser",
          "name": "Temp Administrator User"
        },
        {
          "id": "SYSTEM",
          "name": "SYSTEM"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": [
        {
          "code": 0,
          "option": {
            "name": "Success",
            "id": "success"
          }
        },
        {
          "code": 3010,
          "option": {
            "name": "Success",
            "id": "success"
          }
        }
      ],
      "defaultValueObject": null,
      "description": "Specify how each return code from the process is handled. Success continues the job, Failure stops the job as failed with that return code, and Retry Execution Later stops the job and runs it again later. Any return code not in the list stops the job as failed.",
      "id": "Codehandle",
      "name": "Return Code Handles",
      "regExValidation": "",
      "required": true,
      "type": "CodeHandles",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "success",
          "name": "Success"
        },
        {
          "id": "failure",
          "name": "Failure"
        },
        {
          "id": "retrylater",
          "name": "Retry Execution Later"
        }
      ]
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "ZnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.10.8.2"
}
```
