> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# UnregisterUserCommand Method of the Commands Object

> UnregisterUserCommand method of the Commands Object in ABBYY FineReader Engine Visual Components on Windows — This method cancels the registration of the specified user-defined command.

This method cancels the registration of the specified user-defined command.

## Syntax

### C++

```cpp theme={null}
HRESULT UnregisterUserCommand( MenuItemEnum CommandId );
```

### C\#

```csharp theme={null}
void UnregisterUserCommand( MenuItemEnum CommandId );
```

### Visual Basic .NET

```vb theme={null}
Sub UnregisterUserCommand(CommandId As MenuItemEnum)
```

## Parameters

CommandId

\[in] Specifies the ID assigned to the user command as a [MenuItemEnum](/fine-reader/engine/visual-components-reference/enumerations/menuitemenum) constant. Can have values MI\_CustomCommand1, ... , MI\_CustomCommand10.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[Commands](/fine-reader/engine/visual-components-reference/supplementary-objects/commands)

[RegisterUserCommand](/fine-reader/engine/visual-components-reference/supplementary-objects/commands/registerusercommand-method)

[MenuItemEnum](/fine-reader/engine/visual-components-reference/enumerations/menuitemenum)
